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.

Verilog Assignment code

Status
Not open for further replies.

hareeshP

Member level 3
Joined
Jul 19, 2017
Messages
59
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Activity points
491
Hi All,
Please anyone tell me how the below code works?


Code Verilog - [expand]
1
assign  Reset = (a & cnt[19])? (ok_cnt[19]? b: 1'b1) : b;

 

Reset is assigned based on the conditions on the RHS.

? is the conditional operator in verilog:
(condition) ? (value when condition_is_true) : (value when condition_is_false);

Remember in verilog, like C, any non-zero value counts as true.

- - - Updated - - -

Btw - google will get you many Verilog tutorials - here is the first hit for me:
https://www.asic-world.com/verilog/veritut.html
 

can you please convert the above code into vhdl?
 

actually i am following the vhdl tutorial and i wants convert a verilog source code into vhdl one. So i need to understand the logic used in verilog.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top