Restoring YC's Xerox Alto day 7: experiments with disk and Ethernet emulators
righto.com
righto.com
pin <= 'Z' WHEN tristate ELSE '0' WHEN zero ELSE '1';
...into an instantiation of a tristate IO-buffer on an external "pin" which can high-Z. Sometimes the logic isn't that trivial, though, and you (as a programmer) might not realize that your code actually prohibits the pin from going 'Z'... (or you've confused the VHDL compiler).Better stick to something explicitly simple as the code above, or directly instantiate a bidirectional I/O pin from your chip vendor's VHDL library:
the_pin: IOBUF port map (
T => tristate, -- '1' == high_z
I => data_out, -- data leaving the FPGA, may be tristated
O => data_in, -- data entering the FPGA
IO => pin); -- physical I/O pin -- output data, driven active when \WR is LOW, high-Z otherwise
d <= d_out WHEN wr_en_n = '0' ELSE (others => 'Z');
-- input data
d_in <= d;
Just don't bury the logic in some deeply nested if/else tree tree in a process or state machine, this is likely to not synthetize to what you had intended. :-).I can't say I really understood the problem Carl was having. It seemed to be IO tristates and incorrectly configured port directions, but the post was confusing.
If you're in the SF Bay Area, I'd also suggest seeing the 1401 in person on Wednesdays (3:00 to 3:30) or Saturdays (11 - 11:30) - see also: http://ibm-1401.info/