Open badeaa3 opened 3 months ago
With Ben/Giuseppe realized that the firmware has a logic bug which produces a 500 kHz clock rather than a 1 MHz clock.
The CLK_DIVIDER needs to be set to 50 instead of 100.
Read the following logic to understand the details. https://github.com/SpacelyProject/spacely-caribou-common-blocks/blob/nh_cms28_pix_fw/configReg_interface/src/configReg_interface.sv#L196-L209
// clock divider logic
always @(posedge S_AXI_ACLK or negedge S_AXI_ARESETN) begin
if(~S_AXI_ARESETN) begin
clk_counter <= 0;
ConfigClk <= 0;
end else begin
if(clk_counter == CLK_DIVIDER - 1) begin
ConfigClk <= ~ConfigClk;
clk_counter <= 0;
end else begin
clk_counter <= clk_counter + 1;
end
end
end
We are now able to see the 1 MHz clock by setting in the _top.sv file https://github.com/SpacelyProject/spacely-caribou-common-blocks/blob/nh_cms28_pix_fw/configReg_interface/src/configReg_interface_top.v#L20.
parameter integer CLK_DIVIDER = 50,
Talked with Cristian:
Saw bxclk and bxclk_ana on the scope. The analog clock is used for the analog portion of the chip, while the bxclk is used for the digital portion. We expected to see them both at 40 MHz with a 5ns delay between them. We actually saw them both at 1 MHz and a 250ns delay between them, a 40x difference in both cases. Investigating this now with Cristian, Ben, Jieun.
We see that the clock from pl_clk1 is always at 10 MHz no matter what we set it to.
Two ideas:
create_clock -name PL_CLK1 -period 5.0 [get_ports PL_CLK1]
-> didn't work
Goals: