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.

Problem in Understanding Some Verilog Syntax

Status
Not open for further replies.

ryu_hayabusa

Newbie level 6
Joined
Sep 4, 2012
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,415
Hello everyone,
I have problems in understanding some of these verilog syntaxes:

parameter ALLX_0_0 = {1{1'bx}};

Is the parameter is 1 bit or 2 bits length?

And what does the {1{1'bx}} means? Is it {1{1'bx}} == 2'b1x ?

-----------------------------------------------------------------

if (( ~clk) === 1'bx && (cken_int == 1'b0))
begin
latched_cken = 1'b0;


What actually does the if condition means? Basically 1'bx means that it can be either 1 or 0 right?

-----------------------------------------------------------------

Pls help and Thanks in advance~
 

parameter ALLX_0_0 = {1{1'bx}};

{1{1'bx}}: 1 time 1'bx.
{2{1'bx}}: 2 times 1'bx = 2'bxx.
{2{2'b0x}}: 2 times 2'b0x = 4'b0x0x.

if (( ~clk) === 1'bx && (cken_int == 1'b0))

when you use '==' it means cken_int should be equal to 1'b0 or it can be 1'bx (not sure about 1'bz). 1'b0 == 1'bx and 1'b1 == 1'bx.

when you use '===' it means ~clk MUST be equal RHS. 1'b0 != 1'bx in this case.

Basically 1'bx means that it can be either 1 or 0 right?

Not exactly.
'==' : 'x' can be '0', '1', 'x', 'z'
'===' : 'x' is 'x' (i.e. unknown)

Hope it will help.
 

Thanks for the fast reply kornukhin. It really helps.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top