Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (16 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/Environment/include/Environment.h

    r81 r88  
    2020namespace environment {
    2121
    22   typedef Respons<Ticache_context_t, Ticache_packet_t,Ticache_error_t> irsp_t;
    23   typedef Respons<Tdcache_context_t, Tdcache_packet_t,Tdcache_error_t> drsp_t;
     22  typedef Respons<morpheo::Ticache_context_t, morpheo::Ticache_packet_t,morpheo::Ticache_error_t> irsp_t;
     23  typedef Respons<morpheo::Tdcache_context_t, morpheo::Tdcache_packet_t,morpheo::Tdcache_error_t> drsp_t;
    2424
    2525  class Environment : public sc_module
     
    2929  public : sc_in<bool>                      * NRESET                ;
    3030
    31   public : sc_in <Tcontrol_t           >  *** ICACHE_REQ_VAL        ;
    32   public : sc_out<Tcontrol_t           >  *** ICACHE_REQ_ACK        ;
    33   public : sc_in <Ticache_context_t    >  *** ICACHE_REQ_CONTEXT_ID ;
    34   public : sc_in <Ticache_packet_t     >  *** ICACHE_REQ_PACKET_ID  ;
    35   public : sc_in <Ticache_address_t    >  *** ICACHE_REQ_ADDRESS    ;
    36   public : sc_in <Ticache_type_t       >  *** ICACHE_REQ_TYPE       ;
     31  public : sc_in <morpheo::Tcontrol_t           >  *** ICACHE_REQ_VAL        ;//[nb_entity][icache_dedicated_nb_port]
     32  public : sc_out<morpheo::Tcontrol_t           >  *** ICACHE_REQ_ACK        ;//[nb_entity][icache_dedicated_nb_port]
     33  public : sc_in <morpheo::Ticache_context_t    >  *** ICACHE_REQ_CONTEXT_ID ;//[nb_entity][icache_dedicated_nb_port]
     34  public : sc_in <morpheo::Ticache_packet_t     >  *** ICACHE_REQ_PACKET_ID  ;//[nb_entity][icache_dedicated_nb_port]
     35  public : sc_in <morpheo::Ticache_address_t    >  *** ICACHE_REQ_ADDRESS    ;//[nb_entity][icache_dedicated_nb_port]
     36  public : sc_in <morpheo::Ticache_type_t       >  *** ICACHE_REQ_TYPE       ;//[nb_entity][icache_dedicated_nb_port]
    3737
    38   public : sc_out<Tcontrol_t           >  *** ICACHE_RSP_VAL        ;
    39   public : sc_in <Tcontrol_t           >  *** ICACHE_RSP_ACK        ;
    40   public : sc_out<Ticache_context_t    >  *** ICACHE_RSP_CONTEXT_ID ;
    41   public : sc_out<Ticache_packet_t     >  *** ICACHE_RSP_PACKET_ID  ;
    42   public : sc_out<Ticache_instruction_t> **** ICACHE_RSP_INSTRUCTION;//[nb_instruction]
    43   public : sc_out<Ticache_error_t      >  *** ICACHE_RSP_ERROR      ;
     38  public : sc_out<morpheo::Tcontrol_t           >  *** ICACHE_RSP_VAL        ;//[nb_entity][icache_dedicated_nb_port]
     39  public : sc_in <morpheo::Tcontrol_t           >  *** ICACHE_RSP_ACK        ;//[nb_entity][icache_dedicated_nb_port]
     40  public : sc_out<morpheo::Ticache_context_t    >  *** ICACHE_RSP_CONTEXT_ID ;//[nb_entity][icache_dedicated_nb_port]
     41  public : sc_out<morpheo::Ticache_packet_t     >  *** ICACHE_RSP_PACKET_ID  ;//[nb_entity][icache_dedicated_nb_port]
     42  public : sc_out<morpheo::Ticache_instruction_t> **** ICACHE_RSP_INSTRUCTION;//[nb_entity][icache_dedicated_nb_port][iaccess_nb_instruction]
     43  public : sc_out<morpheo::Ticache_error_t      >  *** ICACHE_RSP_ERROR      ;//[nb_entity][icache_dedicated_nb_port]
    4444
    45   public : sc_in <Tcontrol_t           >  *** DCACHE_REQ_VAL        ;
    46   public : sc_out<Tcontrol_t           >  *** DCACHE_REQ_ACK        ;
    47   public : sc_in <Tdcache_context_t    >  *** DCACHE_REQ_CONTEXT_ID ;
    48   public : sc_in <Tdcache_packet_t     >  *** DCACHE_REQ_PACKET_ID  ;
    49   public : sc_in <Tdcache_address_t    >  *** DCACHE_REQ_ADDRESS    ;
    50   public : sc_in <Tdcache_type_t       >  *** DCACHE_REQ_TYPE       ;
    51   public : sc_in <Tdcache_data_t       >  *** DCACHE_REQ_WDATA      ;
     45  public : sc_in <morpheo::Tcontrol_t           >  *** DCACHE_REQ_VAL        ;//[nb_entity][dcache_dedicated_nb_port]
     46  public : sc_out<morpheo::Tcontrol_t           >  *** DCACHE_REQ_ACK        ;//[nb_entity][dcache_dedicated_nb_port]
     47  public : sc_in <morpheo::Tdcache_context_t    >  *** DCACHE_REQ_CONTEXT_ID ;//[nb_entity][dcache_dedicated_nb_port]
     48  public : sc_in <morpheo::Tdcache_packet_t     >  *** DCACHE_REQ_PACKET_ID  ;//[nb_entity][dcache_dedicated_nb_port]
     49  public : sc_in <morpheo::Tdcache_address_t    >  *** DCACHE_REQ_ADDRESS    ;//[nb_entity][dcache_dedicated_nb_port]
     50  public : sc_in <morpheo::Tdcache_type_t       >  *** DCACHE_REQ_TYPE       ;//[nb_entity][dcache_dedicated_nb_port]
     51  public : sc_in <morpheo::Tdcache_data_t       >  *** DCACHE_REQ_WDATA      ;//[nb_entity][dcache_dedicated_nb_port]
    5252
    53   public : sc_out<Tcontrol_t           >  *** DCACHE_RSP_VAL        ;
    54   public : sc_in <Tcontrol_t           >  *** DCACHE_RSP_ACK        ;
    55   public : sc_out<Tdcache_context_t    >  *** DCACHE_RSP_CONTEXT_ID ;
    56   public : sc_out<Tdcache_packet_t     >  *** DCACHE_RSP_PACKET_ID  ;
    57   public : sc_out<Tdcache_data_t       >  *** DCACHE_RSP_RDATA      ;
    58   public : sc_out<Tdcache_error_t      >  *** DCACHE_RSP_ERROR      ;
     53  public : sc_out<morpheo::Tcontrol_t           >  *** DCACHE_RSP_VAL        ;//[nb_entity][dcache_dedicated_nb_port]
     54  public : sc_in <morpheo::Tcontrol_t           >  *** DCACHE_RSP_ACK        ;//[nb_entity][dcache_dedicated_nb_port]
     55  public : sc_out<morpheo::Tdcache_context_t    >  *** DCACHE_RSP_CONTEXT_ID ;//[nb_entity][dcache_dedicated_nb_port]
     56  public : sc_out<morpheo::Tdcache_packet_t     >  *** DCACHE_RSP_PACKET_ID  ;//[nb_entity][dcache_dedicated_nb_port]
     57  public : sc_out<morpheo::Tdcache_data_t       >  *** DCACHE_RSP_RDATA      ;//[nb_entity][dcache_dedicated_nb_port]
     58  public : sc_out<morpheo::Tdcache_error_t      >  *** DCACHE_RSP_ERROR      ;//[nb_entity][dcache_dedicated_nb_port]
    5959
    6060    // ===== [ Internal ]====================================================
    61   public : Tcontrol_t                      ** icache_req_ack        ;
    62   public : Tcontrol_t                      ** icache_rsp_val        ;
    63   public : Tcontrol_t                      ** dcache_req_ack        ;
    64   public : Tcontrol_t                      ** dcache_rsp_val        ;
     61  public : morpheo::Tcontrol_t                      ** icache_req_ack        ;
     62  public : morpheo::Tcontrol_t                      ** icache_rsp_val        ;
     63  public : morpheo::Tcontrol_t                      ** dcache_req_ack        ;
     64  public : morpheo::Tcontrol_t                      ** dcache_rsp_val        ;
    6565
    6666    // ===== [ Variables ]===================================================
     
    6868  private  : Parameters         * param;
    6969
    70   private: char **                read_iram;
    71   private: char **                read_dram;
    72   private: char *                 write_dram;
     70  private  : char              ** read_iram;
     71  private  : char              ** read_dram;
     72  private  : char               * write_dram;
     73
     74  private  : bool               * context_stop;    // to determine which context have send the signal stop (a same thread can send many signal)
     75  private  : uint32_t             nb_context_stop; // stop the simulation when all context have send the stop signal
     76
    7377
    7478    // ===== [ Components ]==================================================
     
    8892  public   : ~Environment (void);
    8993
    90   public   : bool   init       (std::string section, const char * filename, const char ** list_section);
    91   public   : void   reset      (void);
     94  public   : bool   init           (std::string section, const char * filename, const char ** list_section);
     95  public   : void   reset          (void);
     96  public   : void   stop           (uint32_t num_context);
     97  public   : bool   simulation_end (void);
    9298
    93   public   : void   transition (void);
    94   public   : void   genMoore   (void);
     99  public   : void   transition     (void);
     100  public   : void   genMoore       (void);
    95101
    96102  public   : friend std::ostream& operator<< (std::ostream& output, Environment &x);
     
    137143    }
    138144  };
    139 
    140 
    141 //   private: bool * context_stop;    // to determine which context have send the signal stop (a same thread can send many signal)
    142 //   private: uint3  nb_context_stop; // stop the simulation when all context have send the stop signal
    143 
    144 //     //---------------------------------------------------------------------------------------------
    145 //     //-----[ stop ]--------------------------------------------------------------------------------
    146 //     //---------------------------------------------------------------------------------------------
    147 //   public : bool stop ()
    148 //     {
    149 //       return (nb_context_stop >= nb_context);
    150 //     }
    151 
    152145};
    153146
Note: See TracChangeset for help on using the changeset viewer.