I am trying to implement a custom bridge between a clocked synchronous interface and an asynchronous interface which is not clocked. I am having difficuties in synchronizing the asnychronous interface. I want to synchronize it to avoid timing issues in Quartus. The signals like ebi_cs_n, ebi_bs1_n are misinterpreted as clocks by the tool when left asynchronous. I want to avoid that. Please find the code in attachments. How can I get a synchronous behavior of the synchronous interface. Or is there a better way to kepe the asynchronous interface without running into metastability issues. P.S. Unfortunately the asynchrnonous interface comes without a clock. And that is why I want to turn into a clean code having a synchronous behavior
: Edited by User
if your EBI runs at ..50 MHz or lower then a reliable approach can be achieved by using a high oversampling clock, like 200 MHz.
Alex K. wrote: > The signals like ebi_cs_n, ebi_bs1_n are misinterpreted as clocks by the > tool when left asynchronous. You have written them in a way, they must be "clocks" to a latch. > I want to avoid that. Indeed you should avoid latches unless you want them. And if you want them e.g. for the storing signal s_TSREV then you must accept that the toolchain invokes some kind of clock for those signals. The other way (as already said) is to oversample and synchronize the control signals cs, we, bs... and work with the synchronized signals further on (edge detection for storing/latching the bus value...). BTW: where did you find this strange kind of code?
variable sync_rst : std_logic;
if falling_edge(avln_clk) then
sync_rst := not avln_reset;
if rising_edge(avln_clk) then
nReset <= sync_rst;
This is a very uncommon way to tighten up the timing requirements to the design. Or with other words: do not use both edges of a clock in 1 design. Additionally the avln_reset ist not needed in the sensitivity list, because the result of the process only depends on the avln_clk.