乘法器(可以配置成任意n*n)的具体实现(VHDL语言版)(2)
- UID
- 1029342
- 性别
- 男
|
乘法器(可以配置成任意n*n)的具体实现(VHDL语言版)(2)
end Behavioral;
通过配置参数n,可以实现任意nxn的无符号乘法操作。
测试文件部分如下:
BEGIN
-- Instantiate the Unit Under Test (UUT)
uut: mymult8x8 PORT MAP (
op_a => op_a,
op_b => op_b,
result => result
);
-- Stimulus process
stim_proc: process
begin
-- hold reset state for 100 ns.
wait for 100 ns;
op_a <= x"01";
op_b <= x"FF";
wait for 100 ns;
op_a <= x"FF";
wait for 100 ns;
op_b <= x"01";
wait for 100 ns;
wait;
end process;
END;
结果截图如下:
|
|
|
|
|
|