E
Ethan Zheng
I am so curious about the behavior difference between the following codes.
Please comment,
CODE1:
signal reg_in : signed(17 downto 0);
signal reg_product : signal(35 downto 0);
Product_out_pipe_process : PROCESS (clk)
BEGIN
IF clk'EVENT AND clk = '1' THEM
reg_in <= port_in; -- multiplication pipeline in
reg_product <= reg_in * reg_in; -- pipeline out
port_out <= reg_product;
END IF;
END PROCESS Product_out_pipe_process;
CODE2:
signal reg_in : signed(17 downto 0);
signal reg_product : signal(35 downto 0);
signal reg_product_1 : signal(35 downto 0);
Pipe_in_process : PROGRESS (clk)
BEGIN
IF clk'EVENT AND clk = '1' THEM
reg_in <= port_in;
END IF
END PROCESS Pipe_in_process;
reg_product <= reg_in * reg_in; -- multiplication not clk sensitive
Pipe_out_process : PROGRESS (clk)
BEGIN
IF clk'EVENT AND clk = '1' THEM
reg_product_1 <= reg_product
END IF
END PROGRESS Pipe_out_process
Please comment,
CODE1:
signal reg_in : signed(17 downto 0);
signal reg_product : signal(35 downto 0);
Product_out_pipe_process : PROCESS (clk)
BEGIN
IF clk'EVENT AND clk = '1' THEM
reg_in <= port_in; -- multiplication pipeline in
reg_product <= reg_in * reg_in; -- pipeline out
port_out <= reg_product;
END IF;
END PROCESS Product_out_pipe_process;
CODE2:
signal reg_in : signed(17 downto 0);
signal reg_product : signal(35 downto 0);
signal reg_product_1 : signal(35 downto 0);
Pipe_in_process : PROGRESS (clk)
BEGIN
IF clk'EVENT AND clk = '1' THEM
reg_in <= port_in;
END IF
END PROCESS Pipe_in_process;
reg_product <= reg_in * reg_in; -- multiplication not clk sensitive
Pipe_out_process : PROGRESS (clk)
BEGIN
IF clk'EVENT AND clk = '1' THEM
reg_product_1 <= reg_product
END IF
END PROGRESS Pipe_out_process