Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

asynchronus to synchronous

Status
Not open for further replies.

Johannah

Newbie level 6
Joined
Apr 11, 2017
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
102
Hi,

The picture I have attached is an asynchronous code. However, my library does not contain asynchronous reset. How do I modify my code into synchronous preserving it's functionality. Please help I'm newbie in RTL coding

Thanks
 

Attachments

  • async.PNG
    async.PNG
    17.9 KB · Views: 65

The attached is not a very good description of a system having clock and async reset.

In order to convert do this:
You can have a MINIMUM of two consecutive flip flops, with the async-reset input connected to both of their reset pins and the clock to both of their clock pins.
The output from the second flip flop (Q pin) will be a synchronous reset.
 

In order to convert do this:
You can have a MINIMUM of two consecutive flip flops, with the async-reset input connected to both of their reset pins and the clock to both of their clock pins.
The output from the second flip flop (Q pin) will be a synchronous reset.
??? Not sure what question you are trying to answer. The OP was asking how to convert a Async reset code into a Sync reset code.

Hi,

The picture I have attached is an asynchronous code. However, my library does not contain asynchronous reset. How do I modify my code into synchronous preserving it's functionality. Please help I'm newbie in RTL coding

Thanks
Next time insert the code directly in you post with tags, don't use a picture.

your async reset code:

Code Verilog - [expand]
1
2
3
4
5
6
always @(posedge mclk or posedge puc_rst)
  if (puc_rst)              pmem_dout_bckup_sel <=  1'b0;
  else if (fe_pmem_save)    pmem_dout_bckup_sel <=  1'b1;
  else if (fe_pmem_restore) pmem_dout_bckup_sel <=  1'b0;
 
assign fe_mdb_in = pmem_dout_bckup_sel ? pmem_dout_bckup : pmem_dout;



equivalent sync reset code:

Code Verilog - [expand]
1
2
3
4
5
6
always @(posedge mclk)
  if (puc_rst)              pmem_dout_bckup_sel <=  1'b0;
  else if (fe_pmem_save)    pmem_dout_bckup_sel <=  1'b1;
  else if (fe_pmem_restore) pmem_dout_bckup_sel <=  1'b0;
 
assign fe_mdb_in = pmem_dout_bckup_sel ? pmem_dout_bckup : pmem_dout;


Note: if the clock mclk is not running (or stops running) the register output pmem_dout_bckup_sel will hold the last value it had.
 

The attached is not a very good description of a system having clock and async reset.

In order to convert do this:
You can have a MINIMUM of two consecutive flip flops, with the async-reset input connected to both of their reset pins and the clock to both of their clock pins.
The output from the second flip flop (Q pin) will be a synchronous reset.

you are describing a synchronizer. it's useful when you have to go through different clock domains, but it is not what the OP is asking.
 

my library does not contain asynchronous reset
I'm wondering about the reasonability of this statement. All ASIC libraries that I know have DFF cells with and without asynchronous inputs. But ASIC isn't my business, you may correct me in this regard.

As ads-ee explained, changing the reset into synchronous can't exactly preserve the functionality. You need to verify the function for your reset conditions.

Generally, changing the reset to synchronous shifts the effort to combinational logic in front of DFFs. As some reset terms can be probably combined with existing logic during synthesis, the overall effort may be reduced.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top