Author Topic: about verilog,what is meaning of if(!res_n)  (Read 1758 times)

0 Members and 1 Guest are viewing this topic.

Offline david-ITTopic starter

  • Contributor
  • !
  • Posts: 17
  • Country: us
  • never stop learning
about verilog,what is meaning of if(!res_n)
« on: March 24, 2016, 09:14:45 am »
Reg[17:0]  cnt;
always@(posedge clk)
  if(!rst_n)
  cnt<=18'd0;
  else
  cnt<=cnt+1'b1;


What is the meaning of if(!res_n)?

 

Offline david-ITTopic starter

  • Contributor
  • !
  • Posts: 17
  • Country: us
  • never stop learning
Re: about verilog,what is meaning of if(!res_n)
« Reply #1 on: March 24, 2016, 09:52:26 am »
don't tell me no one knows here :-[
 

Offline Codemonkey

  • Regular Contributor
  • *
  • Posts: 235
  • Country: gb
Re: about verilog,what is meaning of if(!res_n)
« Reply #2 on: March 24, 2016, 10:02:42 am »
It translates to "if res_n signal is low"
 

Offline david-ITTopic starter

  • Contributor
  • !
  • Posts: 17
  • Country: us
  • never stop learning
Re: about verilog,what is meaning of if(!res_n)
« Reply #3 on: March 24, 2016, 10:26:43 am »
It translates to "if res_n signal is low"
thanks for reply,i think i am a little understand now
 

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 797
  • Country: lt
Re: about verilog,what is meaning of if(!res_n)
« Reply #4 on: March 24, 2016, 07:41:02 pm »
It translates to "if res_n signal is low"

Just for the reference: ! means "not". So it translate if rst_n is NOT high or, as being said, if rst_n is low.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf