HDL syntax when using 16-bit buses.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

HDL syntax when using 16-bit buses.

bigmit37
This post was updated on .
I'm trying to write the HDL code for the   Mux4Way16 but I'm not exactly sure what the correct syntax
is when using the 16-bit buses.

My code below is resulting in a error :

"Line 21, a[16]: the specified bus is not...." (can't see the rest, I'm using Windows 7)

It seems my syntax is incorrect?



EDIT:


Thanks got it!
Reply | Threaded
Open this post in threaded view
|

Re: HDL syntax when using 16-bit buses.

cadet1620
Administrator
You can see the entire error message by running the test in the cmd.exe/terminal window
D:\TECS\projects\01\test>HardwareSimulator Mux4Way16.tst
In HDL file D:\TECS\projects\01\test\Mux4Way16.hdl, Line 8, a[16]: the specified sub bus is not in the bus range: load Mux4Way16.hdl

D:\TECS\projects\01\test>

The problem is that  16-bit buses have wire numbers 0 through 15.  This is like an array[16] that only allows indexes 0 through 15.

You need to write either a[0..15]=a[0..15] to connect all the wires, or you can simply write a=a which defaults to connecting all the wires in the buses.

Please edit your post to remove the otherwise working HDL.

--Mark