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 with assigning among different sized arrays in verilog

Status
Not open for further replies.

QMA

Member level 4
Member level 4
Joined
Apr 5, 2007
Messages
72
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,832
Dear all
please help me regarding assigning arrays mutually of different sizes in verilog for xilinx. for example array xyz[3:0] is assigned to abc[4:0]. xyz has 4 bit value while abc has 5 bit value. it is not giving me actual results.
 

hi,
Dear all
please help me regarding assigning arrays mutually of different sizes in verilog for xilinx. for example array xyz[3:0] is assigned to abc[4:0]. xyz has 4 bit value while abc has 5 bit value. it is not giving me actual results.

its based up on your code.like trickydicky said better to show your code.

you can assign like this ::abc <= {0,xyz};
that zero is to fill the extra bit on abc.otherwise there will be some junk value in abc which will give in correct results.
or else i think if you initialize the abc to zero will solve the problem. for this there should't be any further assignment to abc excepts the inputs.

thanks & regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top