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.

Register assignment for diff. width

Status
Not open for further replies.

lakshminarayanan

Newbie level 5
Joined
Sep 11, 2006
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,339
In my design i used to assign a 3 bit register to 15 bit register........it works well in simulation ......will it be having any synthesizing problem.......or backend problems......Is there any restriction for usage of it.......

module tt(.....);
reg [15:0] a;
reg [3:0] b;
............
..........
........
a=b;
........
.......
...
endmodule
 

Hi ,

I am a verification eng ....
so my answer may not be complete .

1) If you are infering a register , are you going to asing rest of the bits by some other logic ?

if yes it is ok , not synthesis my remove rest of the bust ....
some thing u are using and without asignment then netlist simulation may give 'x' .

please give more info rest of the bits and you are trying to infer a register ? ....


Thanks & Regard
yln
 

NO the remaing bits is not assigned for the register..... i am transferring the content of one register of different width to another register......
 

The a=b assignment will work fine - no undefined bits. In general, Verilog temporarily widens all terms on the right side of the assignment prior to executing the operation. You declared b as unsigned, so Verilog widens it with twelve zeros.

By the way, those are 16 and 4 bit registers, not 15 and 3 bits.

It's best to show a complete example. Try to avoid "..." missing information.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top