OSDN Git Service

Merge branch 'debugging' into net-mjpeg
[fpga-leon-mjpeg/leon-mjpeg.git] / grlib-gpl-1.0.22-b4095 / lib / kuri / mjpeg / idct2.vhd
index 26ebf7c..75027be 100644 (file)
@@ -36,7 +36,8 @@ entity idct2 is
            coeffin : in  std_logic_vector (15 downto 0);
            outdata : out  std_logic_vector (7 downto 0);
            ready2 : in std_logic;
-           strobe2 : out std_logic
+           strobe2 : out std_logic;
+           startgen : in std_logic
            );
 end idct2;
 
@@ -184,7 +185,7 @@ signal r, rin : all_reg;
 
 begin
 
-comb : process(r, rst, strobe1, ready2, coeffin)
+comb : process(r, rst, strobe1, ready2, coeffin, startgen)
        variable v : all_reg;
        variable node1 : node1_array;
        variable node2 : node2_array;
@@ -316,7 +317,8 @@ begin
    end if;
    
 -- reset part
-   if rst = '0' then
+   if rst = '0' or startgen = '1' then
+       v.data_reg.inreg := (others => '0');
        for i in 0 to 7 loop
           v.data_reg.accumulator(i) := (others => '0');
           v.data_reg.result_reg(i) := (others => '0');