OSDN Git Service

change jpeg IPCores. startgen signal distribute into all module
[fpga-leon-mjpeg/leon-mjpeg.git] / grlib-gpl-1.0.22-b4095 / lib / kuri / mjpeg / idct1.vhd
index 921b79c..5b120a4 100644 (file)
@@ -37,7 +37,8 @@ entity idct1 is
            quantin : in  std_logic_vector (7 downto 0);
            outdata : out  std_logic_vector (15 downto 0);
            ready2 : in std_logic;
-           strobe2 : out std_logic
+           strobe2 : out std_logic;
+           startgen : in std_logic
            );
 end idct1;
 
@@ -168,7 +169,7 @@ signal r, rin : all_reg;
 
 begin
 
-comb : process(r, rst, strobe1, ready2, coeffin, quantin)
+comb : process(r, rst, strobe1, ready2, coeffin, quantin, startgen)
        variable v : all_reg;
        variable node0 : std_logic_vector(20 downto 0);
        variable node1 : node1_array;
@@ -295,7 +296,7 @@ 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');