I wrote somekind of prescaler in verilog to make sclk_adc signal from clk_i. by now my code looks like:
always @(posedge clk_i)
begin
//generation of sclk_adc
end
now i wonder is there any probability to load shift registers on pos/negedge of generated clock in always @(posedge clk_i) block?
When i wrote this outside the main always block
always @(negedge sclk_adc)
begin
transdata = transtmp;
dataInCh[ch_cnt][15:0] = transdata;
end
always @(posedge sclk_adc)
begin
dout = shiftOut [ch_cnt] [15];
shiftOut [ch_cnt][15:0] = { shiftOut[ch_cnt] [14:0], 1'b0};
end
It is simulated well in the GTKwave, but quartus started to complain about multiply reference to dout (my output), deservedly, i think. So it seems like i have to load them in main always block, but when i add those lines there, shift registers start to load with clk_i, not with the sclk_adc what is logical, but how to avoid this? Please, provide me any clue, thanks
dout
, so it's hard for us to comment on how you can improve your code. \$\endgroup\$