SC Item

From NaplesPU Documentation
Revision as of 20:50, 31 March 2019 by Mirko (talk | contribs) (Created page with "The item interface provides communication between the system and the host. This module (named nuplus_item_interface) implements a control logic which interprets messages from...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The item interface provides communication between the system and the host. This module (named nuplus_item_interface) implements a control logic which interprets messages from the host and applies those requests on the nu+ core through a specific interface.

The supported messages are defined in the module:

typedef enum logic [HOST_COMMAND_WIDTH - 1 : 0] {
  HN_BOOT_COMMAND         = 0, 
  HN_BOOT_ACK             = 1, 
  HN_ENABLE_CORE_COMMAND  = 2, 
  HN_ENABLE_CORE_ACK      = 3, 
  HN_READ_STATUS_COMMAND  = 8, 
  HN_WRITE_STATUS_COMMAND = 9, 
  HN_LOG_REQUEST          = 10 
} hn_messages_t;

The command supported are:

  • HN_BOOT_COMMAND: sets the PC of a given thread, the next item defines the ID of the thread, while the last item sets the PC value. The control logic gathers those information and sets the PC using a specific interface to the core:
output logic                                      hi_job_valid,
output address_t                                  hi_job_pc,
output thread_id_t                                hi_job_thread_id,

When all the required items are ready, the FSM sets the hi_job_valid bit for a clock cycle and forwards PC and thread ID respectively on hi_job_pc and hi_job_thread_id.

  • HN_ENABLE_CORE_COMMAND: sets the active thread mask in the nu+ core. The value from the host is organized as a bitmask, if the i-th is high the i-th is active and it starts running. The bitmask is stored in a dedicated register:
always_ff @ ( posedge clk, posedge reset )
   if ( reset ) begin
      thread_en      <= {`THREAD_NUMB{1'b0}};
   end else begin
      if ( update_thread_en )
         thread_en      <= item_data_i[`THREAD_NUMB - 1 : 0];
end

and combinatorially propagated to the core:

output                 [`THREAD_NUMB - 1 : 0]     hi_thread_en,
assign hi_thread_en        = thread_en;
  • HN_READ_STATUS_COMMAND
  • HN_WRITE_STATUS_COMMAND
  • HN_LOG_REQUEST