BDarji
Occasional Contributor
2 years agoUsage of negative edge trigger for dual clock RAM
Dear all,
Greetings of the Day!
We are having one dual port RAM with separate clock for port A and Port B. Port B related signals are driven within FPGA. While port A related signals will be driven from outside FPGA. Now, external processor which will be driving port A is generating signals based on negative edge of clock.
So, we are thinking to use always @ (nedgedge clk_a) for all logic related to port A while using always@ (posedge clk_b) for all logic related to port B.
For example,
// Port A // Note that in following we have used negative edge. always @ (negedge clk_a) begin if (we_a) begin ram[addr_a] = data_a; end q_a <= ram[addr_a]; end // Port B always @ (posedge clk_b) begin if (we_b) begin ram[addr_b] = data_b; end q_b <= ram[addr_b]; end
- Would Quartus be happy to implement this and infer memory block for this?
- Can this have any impact on achieving timing requirements for port A?
- clk_a and clk_b both are asynchronous so we do not need to worry about timing across domain.
Please feel free to let me know if any further information is needed.
Thank you,
Bhaumik