EmbDev.net

Forum: FPGA, VHDL & Verilog Verilog if statement


von Hareesh M. (Company: Mindteck) (hareeshp)


Rate this post
useful
not useful
hi,
please anyone tell the difference between the below if statement
1
always @(posedge cpld_refclk)
2
begin
3
  if(!pon_rst_n)
4
  begin
5
    req_rst_r <= 1;
1
always @(posedge cpld_refclk)
2
begin
3
  if(!v3v3_pgood)
4
  begin
5
    tier_cnt <= 10'd0;

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
Hareesh M. wrote:
> please anyone tell the difference between the below if statement
I see two different signals. They may have a different function 
also.
Consult the spec of those signals or the schematics for further 
information.

von Hareesh M. (Company: Mindteck) (hareeshp)


Rate this post
useful
not useful
Lothar M. wrote:
> Hareesh M. wrote:
>> please anyone tell the difference between the below if statement
> I see two different signals. They may have a /different function/
> also.
> Consult the spec of those signals or the schematics for further
> information.

pon_rst_n is a active low signal and v3v3_pgood is a active high signal

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
Hareesh M. wrote:
> pon_rst_n is a active low signal and v3v3_pgood is a active high signal
From the very same source/pin?

von Hareesh M. (Company: Mindteck) (hareeshp)


Rate this post
useful
not useful
i actually need to know the statement
1
 if(!pon_rst_n)
 and
1
 if(!v3v3_pgood)
. if i have a pon_rst_n = 1 what will be the output and if i have a 
v3v3_pgood = 0 what will be the result.

von Johann Klammer (Guest)


Rate this post
useful
not useful
Hareesh M. wrote:
> . if i have a pon_rst_n = 1 what will be the output and if i have a

The output is what's in the else clause if there is one (you did not 
show), if there's no else req_rst_r stays the previous stored value.

> v3v3_pgood = 0 what will be the result.

the result will be
tier_cnt <= 10'd0;
on the next up edge

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.