]> AND Private Git Repository - blast.git/blob - lib/implementations/clkrstgen_impl.xml
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
finished VHDL gen. (but have to test further
[blast.git] / lib / implementations / clkrstgen_impl.xml
1 <!DOCTYPE checker>
2 <block_impl ref_name="clkrstgen.xml" ref_md5="">
3   <comments>
4     <author lastname="Domas" mail="sdomas@univ-fcomte.fr" firstname="Stephane"/>
5     <date creation="2018-01-10"/>
6     <related_files list=""/>
7     <description>implementation of cljrstgen that does the connection between
8     external and internal clock and reset</description>    
9     <notes>none</notes>
10   </comments>
11   <libraries>
12     <library name="ieee">
13       <package name="std_logic_1164" use="all"/>
14       <package name="numeric_std" use="all"/>
15     </library>
16   </libraries>
17   <architecture>
18 signal dly       : std_logic := '0';
19 signal rst       : std_logic := '0';
20
21 begin
22
23   process(ext_clk)
24   begin
25     if(rising_edge(ext_clk)) then
26       dly &lt;= (not(ext_reset) and dly and not(rst))
27              or (not(ext_reset) and not(dly) and rst);
28
29       rst &lt;= (not(ext_reset) and not(dly) and not(rst));
30     end if;
31   end process;
32
33   clk   &lt;= ext_clk;
34   reset &lt;= rst xor invert_reset;
35 </architecture>
36 </block_impl>