D
d p chang
Guest
i'm a sw guy wandering through teaching myself a little bit about
(digital) hw, and want to try to go about this 'idiomatically' rather
than trying to translate my sw thinking into hdl (and coming up w/ crap
hdl).
anyway, every sort of 'style guide' that i see warns not to have
unassigned signals in combinatorial logic because one gets latches. i
understand this, but then i started thinking about how i would go about
implementing something 'complicated' like a pci controller.
my sw guy understanding of some of the signals is that when i want the
bus i assert req# and wait for gnt# to be asserted. however, before i
get gnt# i shouldn't be driving any of the other signals. just to play
around w/ this i mocked up a little code (using the xilinx free tools
for the fgpa i got to play w/) which looked something like:
entity foo is
port ( we : out std_logic );
end foo;
...
architecture behavioral of foo is
begin
process(state)
we <= 'z';
...
if (...) then
we <= '1';
end if;
end process;
end;
this causes the tool to mumble that
type of 'we' is not compatible w/ the type of 'z'
is there some other fu that one does in order to 'drive' something as
'unknown'?
\p
(digital) hw, and want to try to go about this 'idiomatically' rather
than trying to translate my sw thinking into hdl (and coming up w/ crap
hdl).
anyway, every sort of 'style guide' that i see warns not to have
unassigned signals in combinatorial logic because one gets latches. i
understand this, but then i started thinking about how i would go about
implementing something 'complicated' like a pci controller.
my sw guy understanding of some of the signals is that when i want the
bus i assert req# and wait for gnt# to be asserted. however, before i
get gnt# i shouldn't be driving any of the other signals. just to play
around w/ this i mocked up a little code (using the xilinx free tools
for the fgpa i got to play w/) which looked something like:
entity foo is
port ( we : out std_logic );
end foo;
...
architecture behavioral of foo is
begin
process(state)
we <= 'z';
...
if (...) then
we <= '1';
end if;
end process;
end;
this causes the tool to mumble that
type of 'we' is not compatible w/ the type of 'z'
is there some other fu that one does in order to 'drive' something as
'unknown'?
\p