⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prmtvs_b.vhdl

📁 vhdl集成电路设计软件.需要用gcc-4.0.2版本编译.
💻 VHDL
📖 第 1 页 / 共 5 页
字号:
          WHEN 'r'     => Schd(n).inp1 := TIME'HIGH;                          Schd(n).inp0 := TIME'HIGH;                          Schd(n).InpX := NOW + tpd(n)(tr01);          WHEN 'f'     => Schd(n).inp0 := TIME'HIGH;                          Schd(n).inp1 := TIME'HIGH;                          Schd(n).InpX := NOW + tpd(n)(tr10);          WHEN 'x'     => Schd(n).inp1 := TIME'HIGH;                          Schd(n).inp0 := TIME'HIGH;                          -- update for X->X change                          Schd(n).InpX := NOW + Minimum ( tpd(n)(tr10),                                                          tpd(n)(tr01) );          WHEN OTHERS  => NULL;                   -- no timing change        END CASE;      END LOOP;    END;    PROCEDURE InvPath (            VARIABLE Schd : INOUT SchedType;            CONSTANT Iedg : IN    EdgeType;            CONSTANT  tpd : IN    VitalDelayType01    ) IS    BEGIN      CASE Iedg IS        WHEN '0'|'1' => NULL;                   -- no edge: no timing update        WHEN '/'|'R' => Schd.inp0 := TIME'HIGH;                        Schd.inp1 := NOW + tpd(tr10);  Schd.Glch1 := Schd.inp1;                        Schd.InpX := Schd.inp1;        WHEN '\'|'F' => Schd.inp1 := TIME'HIGH;                        Schd.inp0 := NOW + tpd(tr01);  Schd.Glch0 := Schd.inp0;                        Schd.InpX := Schd.inp0;        WHEN 'r'     => Schd.inp1 := TIME'HIGH;                        Schd.inp0 := TIME'HIGH;                        Schd.InpX := NOW + tpd(tr10);        WHEN 'f'     => Schd.inp0 := TIME'HIGH;                        Schd.inp1 := TIME'HIGH;                        Schd.InpX := NOW + tpd(tr01);        WHEN 'x'     => Schd.inp1 := TIME'HIGH;                        Schd.inp0 := TIME'HIGH;                        -- update for X->X change                        Schd.InpX := NOW + Minimum(tpd(tr10),tpd(tr01));        WHEN OTHERS  => NULL;                   -- no timing change      END CASE;    END;    PROCEDURE InvPath (            VARIABLE Schd : INOUT SchedArray;            CONSTANT Iedg : IN    EdgeArray;            CONSTANT  tpd : IN    VitalDelayArrayType01    ) IS    BEGIN      FOR n IN Schd'RANGE LOOP        CASE Iedg(n) IS          WHEN '0'|'1' => NULL;                   -- no edge: no timing update          WHEN '/'|'R' => Schd(n).inp0 := TIME'HIGH;                          Schd(n).inp1 := NOW + tpd(n)(tr10);                          Schd(n).Glch1 := Schd(n).inp1;                          Schd(n).InpX := Schd(n).inp1;          WHEN '\'|'F' => Schd(n).inp1 := TIME'HIGH;                          Schd(n).inp0 := NOW + tpd(n)(tr01);                          Schd(n).Glch0 := Schd(n).inp0;                          Schd(n).InpX := Schd(n).inp0;          WHEN 'r'     => Schd(n).inp1 := TIME'HIGH;                          Schd(n).inp0 := TIME'HIGH;                          Schd(n).InpX := NOW + tpd(n)(tr10);          WHEN 'f'     => Schd(n).inp0 := TIME'HIGH;                          Schd(n).inp1 := TIME'HIGH;                          Schd(n).InpX := NOW + tpd(n)(tr01);          WHEN 'x'     => Schd(n).inp1 := TIME'HIGH;                          Schd(n).inp0 := TIME'HIGH;                          -- update for X->X change                          Schd(n).InpX := NOW + Minimum ( tpd(n)(tr10),                                                          tpd(n)(tr01) );          WHEN OTHERS  => NULL;                   -- no timing change        END CASE;      END LOOP;    END;    ---------------------------------------------------------------------------    -- Procedure  : BufEnab, InvEnab    --    -- Purpose    : BufEnab and InvEnab compute output change times, from a    --              change on an input enable port for a 3-state driver. The    --              computed output change times are returned in the composite    --              parameters 'schd1', 'schd0'.    --    --              BufEnab and InpEnab are used together with the delay path    --              selection functions (GetSchedDelay, VitalAND, VitalOR... )    --              The 'schd' value from each of the non-enable input ports of    --              a model (See BufPath, InvPath) are combined using the delay    --              selection functions (VitalAND,  VitalOR, ...). The    --              GetSchedDelay procedure combines the output times on the    --              enable path with the output times from the data path(s) and    --              computes the single delay (delta time) value for scheduling    --              the output change (passed to VitalGlitchOnEvent)    --    --              The values in 'schd*' are: (absolute times)    --                inp0  :  time of output change due to input change to 0    --                inp1  :  time of output change due to input change to 1    --                inpX  :  time of output change due to input change to X    --                glch0 :  time of output glitch due to input change to 0    --                glch1 :  time of output glitch due to input change to 1    --    --              'schd1' contains output times for 1->Z, Z->1 transitions.    --              'schd0' contains output times for 0->Z, Z->0 transitions.    --    --              'BufEnab' is used for computing the output times for an    --              high asserted enable (output 'Z' for enable='0').    --              'InvEnab' is used for computing the output times for an    --              low asserted enable (output 'Z' for enable='1').    --    --              Note: separate 'schd1', 'schd0' parameters are generated    --                    so that the combination of the delay paths from    --                    multiple enable signals may be combined using the    --                    same functions/operators used in combining separate    --                    data paths. (See exampe 2 below)    --    --    -- Parameters : schd1...... Computed output result times for 1->Z, Z->1    --                          transitions. This parameter is modified only on    --                          input edge values (events).    --              schd0...... Computed output result times for 0->Z, 0->1    --                          transitions. This parameter is modified only on    --                          input edge values (events).    --              Iedg....... Input port edge/level value.    --               tpd....... Propagation delays for the enable -> output path.    --    ---------------------------------------------------------------------------    PROCEDURE BufEnab (            VARIABLE Schd1 : INOUT SchedType;            VARIABLE Schd0 : INOUT SchedType;            CONSTANT  Iedg : IN    EdgeType;            CONSTANT   tpd : IN    VitalDelayType01Z    ) IS    BEGIN      CASE Iedg IS        WHEN '0'|'1' => NULL;                   -- no edge: no timing update        WHEN '/'|'R' => Schd1.inp0 := TIME'HIGH;                        Schd1.inp1 := NOW + tpd(trz1);                        Schd1.Glch1 := Schd1.inp1;                        Schd1.InpX := Schd1.inp1;                        Schd0.inp0 := TIME'HIGH;                        Schd0.inp1 := NOW + tpd(trz0);                        Schd0.Glch1 := Schd0.inp1;                        Schd0.InpX := Schd0.inp1;        WHEN '\'|'F' => Schd1.inp1 := TIME'HIGH;                        Schd1.inp0 := NOW + tpd(tr1z);                        Schd1.Glch0 := Schd1.inp0;                        Schd1.InpX := Schd1.inp0;                        Schd0.inp1 := TIME'HIGH;                        Schd0.inp0 := NOW + tpd(tr0z);                        Schd0.Glch0 := Schd0.inp0;                        Schd0.InpX := Schd0.inp0;        WHEN 'r'     => Schd1.inp1 := TIME'HIGH;                        Schd1.inp0 := TIME'HIGH;                        Schd1.InpX := NOW + tpd(trz1);                        Schd0.inp1 := TIME'HIGH;                        Schd0.inp0 := TIME'HIGH;                        Schd0.InpX := NOW + tpd(trz0);        WHEN 'f'     => Schd1.inp0 := TIME'HIGH;                        Schd1.inp1 := TIME'HIGH;                        Schd1.InpX := NOW + tpd(tr1z);                        Schd0.inp0 := TIME'HIGH;                        Schd0.inp1 := TIME'HIGH;                        Schd0.InpX := NOW + tpd(tr0z);        WHEN 'x'     => Schd1.inp0 := TIME'HIGH;                        Schd1.inp1 := TIME'HIGH;                        Schd1.InpX := NOW + Minimum(tpd(tr10),tpd(tr01));                        Schd0.inp0 := TIME'HIGH;                        Schd0.inp1 := TIME'HIGH;                        Schd0.InpX := NOW + Minimum(tpd(tr10),tpd(tr01));        WHEN OTHERS  => NULL;                   -- no timing change      END CASE;    END;    PROCEDURE InvEnab (            VARIABLE Schd1 : INOUT SchedType;            VARIABLE Schd0 : INOUT SchedType;            CONSTANT  Iedg : IN    EdgeType;            CONSTANT   tpd : IN    VitalDelayType01Z    ) IS    BEGIN      CASE Iedg IS        WHEN '0'|'1' => NULL;                   -- no edge: no timing update        WHEN '/'|'R' => Schd1.inp0 := TIME'HIGH;                        Schd1.inp1 := NOW + tpd(tr1z);                        Schd1.Glch1 := Schd1.inp1;                        Schd1.InpX := Schd1.inp1;                        Schd0.inp0 := TIME'HIGH;                        Schd0.inp1 := NOW + tpd(tr0z);                        Schd0.Glch1 := Schd0.inp1;                        Schd0.InpX := Schd0.inp1;        WHEN '\'|'F' => Schd1.inp1 := TIME'HIGH;                        Schd1.inp0 := NOW + tpd(trz1);                        Schd1.Glch0 := Schd1.inp0;                        Schd1.InpX := Schd1.inp0;                        Schd0.inp1 := TIME'HIGH;                        Schd0.inp0 := NOW + tpd(trz0);                        Schd0.Glch0 := Schd0.inp0;                        Schd0.InpX := Schd0.inp0;        WHEN 'r'     => Schd1.inp1 := TIME'HIGH;                        Schd1.inp0 := TIME'HIGH;                        Schd1.InpX := NOW + tpd(tr1z);                        Schd0.inp1 := TIME'HIGH;                        Schd0.inp0 := TIME'HIGH;                        Schd0.InpX := NOW + tpd(tr0z);        WHEN 'f'     => Schd1.inp0 := TIME'HIGH;                        Schd1.inp1 := TIME'HIGH;                        Schd1.InpX := NOW + tpd(trz1);                        Schd0.inp0 := TIME'HIGH;                        Schd0.inp1 := TIME'HIGH;                        Schd0.InpX := NOW + tpd(trz0);        WHEN 'x'     => Schd1.inp0 := TIME'HIGH;                        Schd1.inp1 := TIME'HIGH;                        Schd1.InpX := NOW + Minimum(tpd(tr10),tpd(tr01));                        Schd0.inp0 := TIME'HIGH;                        Schd0.inp1 := TIME'HIGH;                        Schd0.InpX := NOW + Minimum(tpd(tr10),tpd(tr01));        WHEN OTHERS  => NULL;                   -- no timing change      END CASE;    END;    ---------------------------------------------------------------------------    -- Procedure  : GetSchedDelay    --    -- Purpose    : GetSchedDelay computes the final delay (incremental) for    --              for scheduling an output signal.  The delay is computed    --              from the absolute output times in the 'NewSched' parameter.    --              (See BufPath, InvPath).    --    --              Computation of the output delay for non-3_state outputs    --              consists of selection the appropriate output time based    --              on the new output value 'NewValue' and subtracting 'NOW'    --              to convert to an incremental delay value.    --    --              The Computation of the output delay for 3_state output    --              also includes combination of the enable path delay with    --              the date path delay.    --    -- Parameters : NewDelay... Returned output delay value.    --              GlchDelay.. Returned output delay for the start of a glitch.    --              NewValue... New output value.    --              CurValue... Current value of the output.    --              NewSched... Composite containing the combined absolute    --                          output times from the data inputs.    --              EnSched1... Composite containing the combined absolute    --                          output times from the enable input(s).    --                          (for a 3_state output transitions 1->Z, Z->1)    --              EnSched0... Composite containing the combined absolute    --                          output times from the enable input(s).    --                          (for a 3_state output transitions 0->Z, Z->0)    --    ---------------------------------------------------------------------------    PROCEDURE GetSchedDelay (            VARIABLE   NewDelay : OUT TIME;            VARIABLE  GlchDelay : OUT TIME;            CONSTANT   NewValue : IN  std_ulogic;            CONSTANT   CurValue : IN  std_ulogic;            CONSTANT   NewSched : IN  SchedType    ) IS        VARIABLE Tim, Glch : TIME;    BEGIN        CASE To_UX01(NewValue) IS          WHEN '0'    => Tim  := NewSched.inp0;                         Glch := NewSched.Glch1;          WHEN '1'    => Tim  := NewSched.inp1;                         Glch := NewSched.Glch0;          WHEN OTHERS => Tim  := NewSched.InpX;                         Glch := -1 ns;        END CASE;        IF (CurValue /= NewValue)          THEN Glch := -1 ns;        END IF;        NewDelay  := Tim  - NOW;        IF Glch < 0 ns            THEN GlchDelay := Glch;            ELSE GlchDelay := Glch - NOW;        END IF; -- glch < 0 ns    END;    PROCEDURE GetSchedDelay (            VARIABLE   NewDelay : OUT VitalTimeArray;            VARIABLE  GlchDelay : OUT VitalTimeArray;            CONSTANT   NewValue : IN  std_logic_vector;            CONSTANT   CurValue : IN  std_logic_vector;            CONSTANT   NewSched : IN  SchedArray    ) IS        VARIABLE Tim, Glch : TIME;        ALIAS  NewDelayAlias : VitalTimeArray( NewDelay'LENGTH DOWNTO 1)               IS NewDelay;        ALIAS GlchDelayAlias : VitalTimeArray(GlchDelay'LENGTH DOWNTO 1)               IS GlchDelay;        ALIAS  NewSchedAlias : SchedArray( NewSched

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -