UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
1,496 Views
Registered: ‎10-15-2018

How to invert reset polarity ?

Jump to solution

Hi.

 

I am working on a design on Zynq 7 series FPGA. We are using some divider and IFFT Logic-core blocks.

Earlier version of the IP used an Active high reset. Newer versions use Active low reset.

 

I am adding an inverter in my wrapper file to invert the reset gotten by the Logic Core IP block. But in Post implementation simulation - the behavior of the reset signal on both sides around this inverter is wierd. It is showing aresetn as the port of my wrapper - although aresetn is the port of IP block while areset is the port of my wrapper. Also, it shows that aresetn stays low during run - which probably means reset stays asserted.

 

How am I supposed to invert this reset signal polarity correctly ?

 

Thanks and sincerely

Bhawandeep Singh

 

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
1,311 Views
Registered: ‎10-04-2018

Re: How to invert reset polarity ?

Jump to solution

@bhawandeepsingh could you try this:

 

 

input areset;
reg aresetn;

always @ (posedge aclk or posedge areset)
	if (areset)
		aresetn <= 1'b0;
	else 
		aresetn <= 1'b1;
		

 

10 Replies
Scholar drjohnsmith
Scholar
1,469 Views
Registered: ‎07-09-2009

Re: How to invert reset polarity ?

Jump to solution

do you mind posting were it says the reset polarity has changed please

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
1,430 Views
Registered: ‎10-15-2018

Re: How to invert reset polarity ?

Jump to solution
Scholar drjohnsmith
Scholar
1,416 Views
Registered: ‎07-09-2009

Re: How to invert reset polarity ?

Jump to solution

Thanks for that,

 

I'd forgotten that resets used to be active high, and in the 'new' AXI land they are active low,

 

I'll have to keep an eye out for that , at least its documented.

 

As for the original question, 

   it should work just providing a reset externally of the correct polarity,

       can you share a code snippet please?

 

 Also , be aware, that signals get re named , and unless you have the keep attribute or equivalent, signals can be combined post place / route to make more efficient code by the tools.

 

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
1,408 Views
Registered: ‎10-15-2018

Re: How to invert reset polarity ?

Jump to solution

The below is from my wrapper -

 

// Among the ports

input      areset;

 

// In the module body

reg aresetn;
always @ (posedge aclk)
    begin
        aresetn <= #0.1 ~areset;    
    end

 

//Instantiation of the LogicCore block
div_16_16_2clk_signed  zynq7_div_16_16_2clk_signed(
                                                .aclk(aclk),                                      // input wire aclk
                                                .aresetn(aresetn),                                // input wire aresetn

... and so on

0 Kudos
Scholar drjohnsmith
Scholar
1,390 Views
Registered: ‎07-09-2009

Re: How to invert reset polarity ?

Jump to solution

Your syncronising the async reset to the clock , 

    do you need to do this ?

 

assign aresetn  = ~areset;

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
1,386 Views
Registered: ‎10-15-2018

Re: How to invert reset polarity ?

Jump to solution

I did the same first.

It didnt work either, the original problem statement in first post of the thread is from combinational inversion.

It was exactly what you have written. The inverter was not showing.

 

Then I tried .arestn (!areset) in the instantiation - without specifying invertor/inversion separately.

Same behavior.

 

Then I put a flop. It is still not working. The module simulation is showing input lines stay at z although 2 of them are tied to 1 in RTL.

0 Kudos
Scholar drjohnsmith
Scholar
1,361 Views
Registered: ‎07-09-2009

Re: How to invert reset polarity ?

Jump to solution

well, assuming the inverter has not been absorbed,

   and you are driving it correct, 

 

then sounds to me like your best bet is to take a step back and try a much simpler example ,

 

 

 

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
1,351 Views
Registered: ‎10-15-2018

Re: How to invert reset polarity ?

Jump to solution

Much simpler example ?

We have a delivery coming ... I got to get this to work.

 

0 Kudos
Adventurer
Adventurer
1,312 Views
Registered: ‎10-04-2018

Re: How to invert reset polarity ?

Jump to solution

@bhawandeepsingh could you try this:

 

 

input areset;
reg aresetn;

always @ (posedge aclk or posedge areset)
	if (areset)
		aresetn <= 1'b0;
	else 
		aresetn <= 1'b1;
		

 

1,184 Views
Registered: ‎10-15-2018

Re: How to invert reset polarity ?

Jump to solution

@hayk.petr- Thanks. The reset is getting inverted - and schematic matched verilog code. But for some reason, in some modules there is a 5-6 cycles delay b/w areset switching and aresetn switching in the post place and route simulation. I am still looking into it.  Thanks.

0 Kudos