The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 19th, 2024, 5:15am
Pages: 1
Send Topic Print
Verilog bus annotation using another bus (Read 1844 times)
Ohn
New Member
*
Offline



Posts: 1

Verilog bus annotation using another bus
Jan 11th, 2012, 7:12am
 
Hi,

I am trying to mux the n'th bit from a 256-bit wide bus, using the following method (which reminds C programming more than Verilog...):

module aaa (
input [255:0] y,
input [7:0] n,
output x
);

assign x = y[n];

endmodule

I have 2 cases:
1. When y is [255:0]
2. When y is [199:0] (obviously, not all 'n' values are acceptable)

The above code works in simulation, though something smells fishy.
Does anyone know what is the implementation of standard synthesis tools to this block?
What about case 2 - what would happen if 'n' gets the value of 200 and above? What value will be assigned to 'x' ?

Thanks,
Ohn
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.