Z
Zac Bond
Guest
I am constructing a 5-bit multiplier, and am having a great deal of
difficulty getting my outputs to display onscreen during my testbench.
I had *thought* that the following is correct:
architecture bit5_signed_multiplier_testbench_arch of
bit5_signed_multiplier_testbench is
component bit5_signed_multiplier
-- big irrelevent port list
end component;
signal t_multd, t_multr: unsigned(4 downto 0) := "00000";
signal t_go : std_logic := '0';
signal t_Z: unsigned(9 downto 0) := "0000000000";
begin
TestMult: bit5_signed_multiplier port map (t_multd, t_multr, t_go,
t_Z);
Tester: process
variable s: line;
begin
t_multd <= "01000"; -- multiplicand
t_multr <= "01000"; -- multiplier
wait for 5 ns;
t_go <= '1'; -- "start computation" signal
wait for 5 ns;
write(s, "Answer is Z = "); -- line 105
write(s, std_logic_vector(t_Z), right, 0); -- line 106
writeline(output, s);
t_go <= '0';
assert false report "Simulation complete." severity failure;
end process Tester;
end bit5_signed_multiplier_testbench_arch;
Unfortunately, when I compile I get the following messages:
ERROR: P4A.vhd(105): Subprogram "write" is ambiguous.
ERROR: P4A.vhd(105): type error resolving function call: write
ERROR: P4A.vhd(106): No feasible entries for subprogram write
I don't understand why there are no feasible write entries for a
std_logic_vector. What is the correct way to write these output
functions?
Thanks,
Zac Bond
zwb2@cwru.edu
difficulty getting my outputs to display onscreen during my testbench.
I had *thought* that the following is correct:
architecture bit5_signed_multiplier_testbench_arch of
bit5_signed_multiplier_testbench is
component bit5_signed_multiplier
-- big irrelevent port list
end component;
signal t_multd, t_multr: unsigned(4 downto 0) := "00000";
signal t_go : std_logic := '0';
signal t_Z: unsigned(9 downto 0) := "0000000000";
begin
TestMult: bit5_signed_multiplier port map (t_multd, t_multr, t_go,
t_Z);
Tester: process
variable s: line;
begin
t_multd <= "01000"; -- multiplicand
t_multr <= "01000"; -- multiplier
wait for 5 ns;
t_go <= '1'; -- "start computation" signal
wait for 5 ns;
write(s, "Answer is Z = "); -- line 105
write(s, std_logic_vector(t_Z), right, 0); -- line 106
writeline(output, s);
t_go <= '0';
assert false report "Simulation complete." severity failure;
end process Tester;
end bit5_signed_multiplier_testbench_arch;
Unfortunately, when I compile I get the following messages:
ERROR: P4A.vhd(105): Subprogram "write" is ambiguous.
ERROR: P4A.vhd(105): type error resolving function call: write
ERROR: P4A.vhd(106): No feasible entries for subprogram write
I don't understand why there are no feasible write entries for a
std_logic_vector. What is the correct way to write these output
functions?
Thanks,
Zac Bond
zwb2@cwru.edu