wiki:CaoCourseTme3Exemple
entity exemple is
   port (
      clk    : in bit;
      resetn : in bit
   );
end exemple;

architecture structural of exemple is
component PIR3000
   port (
      clk    : in bit;
      resetn : in bit;
      ireq   : out bit;
      ignt   : in bit;
      dreq   : out bit;
      dgnt   : in bit;
      opc    : out bit;
      lock   : out bit;
      read   : inout bit;
      a      : inout bit;
      d      : inout bit;
      ack    : in bit;
      tout   : in bit;
      it_0   : in bit;
      it_1   : in bit;
      it_2   : in bit;
      it_3   : in bit;
      it_4   : in bit;
      it_5   : in bit;
      snoopdo: in bit
   );
end component;

component PIRAM
   port (
      clk    : in    bit;
      resetn : in    bit;
      sel    : in    bit;
      opc    : in    bit;
      read   : in    bit;
      a      : in    bit;
      d      : inout bit;
      ack    : out   bit;
      tout   : in    bit
   );
end component;

component PITTY
   port (
      clk    : in bit;
      resetn : in bit;
      sel    : in bit;
      opc    : in bit;
      read   : in bit;
      a      : in bit;
      d      : inout bit;
      ack    : out bit;
      tout   : in bit
   );
end component;

component PIBCU
    port (
       clk     : in bit;
       req0    : in bit;
       req1    : in bit;
       gnt0    : out bit;
       gnt1    : out bit;
       sel1    : out bit;
       sel2    : out bit;
       sel3    : out bit;
       sel4    : out bit;
       sel5    : out bit;
       sel6    : out bit;
       sel7    : out bit;
       sel8    : out bit;
       sel9    : out bit;
       snoopdo : out bit;
       resetn  : in bit;
       opc     : in bit;
       read    : in bit;
       lock    : in bit;
       a       : in bit;
       d       : inout bit;
       ack     : inout bit;
       tout    : out bit;
       it      : out bit
    );
end component;

signal opc    : bit;
signal read   : bit;
signal lock   : bit;
signal a      : bit;
signal d      : bit;
signal ack    : bit;
signal tout   : bit;

signal it_0   : bit;
signal it_1   : bit;
signal it_2   : bit;
signal it_3   : bit;
signal it_4   : bit;
signal it_5   : bit;

signal req0   : bit;
signal req1   : bit;

signal gnt0   : bit;
signal gnt1   : bit;

signal sel1   : bit;
signal sel2   : bit;
signal sel3   : bit;
signal sel4   : bit;
signal sel5   : bit;
signal sel6   : bit;
signal sel7   : bit;
signal sel8   : bit;
signal sel9   : bit;
signal snoopdo: bit;

begin

   r3000 : Pir3000
   port map (
      clk     => clk,
      resetn  => resetn,
      ireq    => req0,
      ignt    => gnt0,
      dreq    => req1,
      dgnt    => gnt1,
      opc     => opc,
      lock    => lock,
      read    => read,
      a       => a,
      d       => d,
      ack     => ack,
      tout    => tout,
      snoopdo => snoopdo,
      it_0    => it_0,
      it_1    => it_1,
      it_2    => it_2,
      it_3    => it_3,
      it_4    => it_4,
      it_5    => it_5
   );

   rst : piram
   port map (
      clk    => clk,
      resetn => resetn,
      sel    => sel1,
      opc    => opc,
      read   => read,
      a      => a,
      d      => d,
      ack    => ack,
      tout   => tout
   );

   exc : piram
   port map (
      clk    => clk,
      resetn => resetn,
      sel    => sel2,
      opc    => opc,
      read   => read,
      a      => a,
      d      => d,
      ack    => ack,
      tout   => tout
   );

   bcu : pibcu
   port map (
      clk    => clk,
      req0   => req0,
      req1   => req1,

      gnt0   => gnt0,
      gnt1   => gnt1,
      
      sel1   => sel1,
      sel2   => sel2,
      sel3   => sel3,
      sel4   => sel4,
      sel5   => sel5,
      sel6   => sel6,
      sel7   => sel7,
      sel8   => sel8,
      sel9   => sel9,

      resetn => resetn,
      opc    => opc,
      read   => read,
      lock   => lock,
      a      => a,
      d      => d,
      ack    => ack,
      tout   => tout,
      snoopdo=> snoopdo,
      it     => it_1
   );

   ins : piram
   port map (
      clk    => clk,
      resetn => resetn,
      sel    => sel3,
      opc    => opc,
      read   => read,
      a      => a,
      d      => d,
      ack    => ack,
      tout   => tout
   );

   dat : piram
   port map (
      clk    => clk,
      resetn => resetn,
      sel    => sel4,
      opc    => opc,
      read   => read,
      a      => a,
      d      => d,
      ack    => ack,
      tout   => tout
   );
     
   tty : pitty
   port map (
      clk    => clk,
      resetn => resetn,
      sel    => sel5,
      opc    => opc,
      read   => read,
      a      => a,
      d      => d,
      ack    => ack,
      tout   => tout
   );

   ttz : pitty
   port map (
      clk    => clk,
      resetn => resetn,
      sel    => sel9,
      opc    => opc,
      read   => read,
      a      => a,
      d      => d,
      ack    => ack,
      tout   => tout
   );
end structural;
Last modified 18 years ago Last modified on Feb 15, 2007, 6:45:18 PM