![]() |
|
|
|
#1 |
|
I usually use the std_logic type instead of bit, but I use it as "bits" anyway (as VHDL lacks support for don't care, and other values are mostly helpful for debugging)
There's one strange possible value, 'Z', described as high impedance. I kinda understand what it's supposed to do but I have no clue how one could use it in VHDL as-is. Could anyone show some examples of meaningful uses? joris |
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2008
Location: Denmark
Posts: 245
|
Well - 3-state buffers normally used whenever you want's to drive a line (a BUS) with more the one driver (output).
I got this example with a SPI Master and Slave (should be slaves to make more sence) - If you got two or more independent slave then only one of them allowed to drive the MISO line, hence must it be controlled with a statement like this: MISO <= Shreg(7) when SS='0' else 'Z'; the complete code can be seen here:http://www.jjmk.dk/MMMI/Exercises/05...Ver2/index.htm Hope it helped you Jeppe jeppe |
|
|
|