ATLAS
A NoC Generation and Evaluation
Framework
HERMES
Outline
•
ATLAS framework
•
Creating a project
•
Generating a NoC
•
Generating a traffic scenery
•
Simulating the NoC with a traffic
scenery
ATLAS Framework
Na kriti: module load atlas
The main window of the ATLAS framework allows invoking the tools which compose the stages of the design flow for some NoCs
Types of NoCs
ATLAS has many others features under way, including support to GALS systems, asynchronous NoCs and packet multicast.
Outline
•
ATLAS framework
•
Creating a project
•
Generating a NoC
•
Generating a traffic scenery
•
Simulating the NoC with a traffic
scenery
Creating a project
Creating or opening a project is the first step in ATLAS framework.
To create a project, the user must choose the New Project option on the Projects menu in ATLAS main window.
In the New Project window, the user must inform:
Project's name NoC type
Outline
•
ATLAS framework
•
Creating a project
•
Generating a NoC
•
Generating a traffic scenery
•
Simulating the NoC with a traffic
scenery
Generating a NoC
The NoC Generation tool produces all modules which compose the NoC, all described in VHDL. It also produces a basic testbench, a set of files described in SystemC.
To show the NoC Generation tool, the user must click on the NoC Generation button in ATLAS main window.
Generating a NoC
In the NoC Generation tool, the user must configure the NoC parameters and click on the Generate button.
Generating a NoC
During NoC generation, the following structure of directories is constructed:
The NoC directory contains the NoC VHDL files;
The SC_NoC directory contains the testbench files described in SystemC; The Hermes4x4_2VC.nocfile describes the NoC;
The simulate.do file is a script for the ModelSim® simulator;
The topNoC.vhd file is top simulation file, that instantiates the NoC and connects the testbench to it.
Outline
•
ATLAS framework
•
Creating a project
•
Generating a NoC
•
Generating a traffic scenery
•
Simulating the NoC with a traffic
scenery
Generating a traffic scenery
The Traffic Generation tool produces the traffic files describing a behaviour to be transmitted through the NoC during simulation.
To show the Traffic Generation tool, the user must click on the Traffic Generation button in ATLAS main window.
Generating a traffic scenery
To create a new traffic scenery, the user must click on the Manage Scenery menu and select the New Scenery option.
In the New Scenery window illustrated, the user must insert the new scenery's name and click on the Ok button.
Generating a traffic scenery
The Configuration menu allows the user to define the Standard Configuration of the parameters used by the NoC interfaces during traffic generation. This configuration is called standard because it is assigned by default to all router interfaces of the NoC.
Generating a traffic scenery
The Standard Configuration presents the three possible window formats. The five parameters presented in the top of all windows are independent. However, the parameters presented in the bottom of the windows change depending on the choice of distribution type to use (Uniform, Normal and Pareto on/off).
Generating a traffic scenery
The NoC visualization area allows the selection of individual routers for configuration of their traffic parameters. In this example, the user clicked on the router with the physical address 22.
Generating a traffic scenery
Once at least one router in the NoC has been configured to generate traffic for the simulation, the user can click on the Generate button.
Generating a traffic scenery
During the traffic generation, the following directory sub tree is built:
The Traffic directory contains all traffic sceneries of the project;
The uniform_20percent directory contains all files of traffic scenery with the same name;
The uniform_20percent.traffic file describes the traffic scenery;
The In directory contains the simulation input files which are generated by the Traffic Generation tool;
The Out directory is created to contain the output files generated after the simulation step.
Outline
•
ATLAS framework
•
Creating a project
•
Generating a NoC
•
Generating a traffic scenery
•
Simulating the NoC with a traffic
scenery
Simulating the NoC
In ATLAS framework, NoC simulation is executed using the
ModelSim® simulator. If the user doesn't have access to this simulator or if he/she desires to use another simulator, this can still be undertaken, but the simulation phase must not be executed within the ATLAS framework.
To show the window used for simulation control, the user must click on the Simulation button in the ATLAS main window.
Simulating the NoC
In the Simulation tool, the user must inform:
scenery's name indicates the scenery's name to be simulated;
Simulation Time is configured in two parameters: (i) number of time units (an integer) and (ii) time resolution (fs, ps, ns, us, ms or sec);
Internal Evaluation indicates if the simulation results must produce data to allow the internal evaluation of the NoC (internal ports and links of the NoC);
Power Sampling Period indicates the interval in which the average power will be calculated;
Simulating the NoC
The NoC Simulation tool uses scripts to manipulate the traffic scenery files, to invoke the ModelSim® simulator and to compile and simulate the NoC.
A progress bar is showed after the start of the simulation. If all goes well, at the end of simulation this progress bar is closed and the simulation output files are in the Out directory of the traffic scenery.
Outline
•
ATLAS framework
•
Creating a project
•
Generating a NoC
•
Generating a traffic scenery
•
Simulating the NoC with a traffic
scenery
Evaluating the NoC performance
The Performance Evaluation tool was developed to facilitate the analysis of the result data generated during simulation of the NoC. To show this tool, the user must click on the Performance Evaluation
button in the ATLAS main window.
The first step in this tool is the selection of the traffic scenery to be analysed. The user selects the traffic scenery for analysis when he/she clicks on the Open button.
Evaluating the NoC performance
In the Performance Evaluation tool, the user can fire the analysis of several basic parameters associated to the external or internal working of the NoC message delivery services. This includes but is not limited to evaluation of throughput and latency data at specific points of the NoC or at its external interfaces.
Evaluating the NoC performance
Three types of reports can be generated:
Links Analysis Report (only when internal evaluation was selected)
Latency Analysis Report Global Report
Evaluating the NoC performance
Links Analysis Report shows a report containing information (for example, the number of packets transmitted, the number of bits per clock cycle) about all links in the NoC.
Evaluating the NoC performance
Latency Analysis Report shows a list of the packets that presented extreme values of latency during simulation, ordered by latency dimension.
In the latency analysis report, the user must inform:
number of packets type of ordering
Evaluating the NoC performance
Global Report presents a global summary of the external evaluation data. This summary is showed in HTML format.
The external analysis results are grouped in flows. A flow is a set of packets which possess the same source and target cores.
Evaluating the NoC performance
The external evaluation refers to performance data related exclusively to the local ports of the NoC routers.
To visualize data resulting from external evaluation, the user must select the External option in the Evaluation parameter.
Evaluating the NoC performance
The external evaluation results are grouped in flows. The user should configure the following parameters:
address of the source and target cores of the desired flow
number of points to plot when showing the data in the graph (parameter points per interval, named option Interval)
percentage of packets to suppresswhen showing the performance data
Based in these parameters, two types of graphs can be generated:
Throughput Distribution Latency Distribution
Evaluating the NoC performance
The internal evaluation allows analysing the data referring to the internal ports and links of the NoC.
To visualize data resulting from internal evaluation, the user must select the Internal option in the Evaluation parameter. This parameter is deactivated when the user does not select the Internal Evaluation
Evaluating the NoC performance
The internal evaluation allows the generation of performance data about five parameters:
number of flits transmitted cycles per flit
channel utilization throughput
rates distribution
There are two non-exclusive formats available to visualize the results:
Text
Evaluating the NoC power
The HEFESTUS module is responsible to perform the Hermes NoC power evaluation, based on a rate-based power estimation model.
To show this tool, the user must click on the Power Evaluation button in the ATLAS main window.
Evaluating the NoC power
The Power Evaluation window has three main buttons:
Router Power Dissipation Analysis NoC Average Power Dissipation NoC Power Distribution
The field time represents the amount of time for the power distribution analysis button.
Evaluating the NoC power
The HEFESTUS module can perform power evaluation before and after the NoC simulation executed in the ATLAS framework.
Before the simulation, in the Pre-Simulation Analysis field, the user can evaluate the power dissipation of every router type present in the NoC.
Evaluating the NoC power
The Post-Simulation Analysis field present the power evaluation performed after the NoC simulation executed in the ATLAS framework, and these evaluations are performed using a rate-based power estimation model.
NoC Average Power Consumption button displays a graphic for the entire simulation time.
Evaluating the NoC power
The NoC Power Distribution button shows a 3D graphic with the NoC power dissipation distribution for the simulation time described in the time field.
Evaluating the NoC power
The evaluated NoC is displayed at the right side of the main window, selecting any of the represented routers will display, graphically, the selected router average power dissipation for the entire simulation time.
01 11 21 IP IP IP 00 10 20 IP IP IP 02 12 22 IP IP IP N S W E L Controle ♦ Características
♦ Todo IP é conectado a um roteador
♦ Endereçamento XY
♦ Até 5 portas unidirecionais por roteador (N / S / W / E + Local) ♦ Bufferização de entrada
h ack_h
Arbiter
req_rot ack_rot incoming
Routing Logic
req_rot ack_rot incoming header free in out
data_out tx ack_tx
data_in rx ack_rx
Buffer
h ack_h data_av data data_ack free
S
out
data_in all ports
data_out tx ack_tx
N
data_in rx ack_rx
Buffer
h ack_h data_av data data_ack free out
data_in all ports
in
ack_tx all ports
out
data_av all ports
out
data_av all ports
in
ack_tx all ports free all ports data all ports
♦ Características ♦ Bufferização de entrada ♦ Arbitragem round-robin
NoC Hermes
Buffers de entrada Round robin Roteamento (XY) Porta de saídaREQUISIÇÕES ORIUNDAS DAS PORTAS DE ENTRADA
acknowledges
♦ Características
♦ Apenas o primeiro flit é tratado (endereço de destino)
♦ Arbitragem rotativa das prioridades de acesso às portas de saída (round robin)
NoC Hermes
…
f4 f3 f2 f1 f0fn-1 n ad
ENDEREÇO DE DESTINO NÚMERO DE FLITS DO PACOTE
Flits Buffer port 0 Buffer port 4
…
…
h ack_h
Arbiter
REQUISIÇÕES ORIUNDAS DAS PORTAS DE ENTRADA
acknowledges
♦ Características
♦ Apenas o primeiro flit é tratado (endereço de destino)
♦ Arbitragem rotativa das prioridades de acesso às portas de saída (round robin)
NoC HERMES
…
f4 f3 f2 f1 f0fn-1 n ad
ENDEREÇO DE DESTINO NÚMERO DE FLITS DO PACOTE
Flits Buffer port 0 Buffer port 4
…
…
h ack_h
Arbiter
req_rot ack_rot incoming
Routing Logic
req_rot ack_rot incoming header
in out
Portas de Entrada (N/S/E/W/L)
Endereço de destino
♦ Características
♦ Apenas o primeiro flit é tratado (endereço de destino)
♦ Arbitragem rotativa das prioridades de acesso às portas de saída (round robin)
NoC HERMES
…
f4 f3 f2 f1 f0fn-1 n ad
ENDEREÇO DE DESTINO NÚMERO DE FLITS DO PACOTE
Flits Buffer port 0 Buffer port 4
…
…
h ack_h
Arbiter
req_rot ack_rot incoming
Routing Logic
req_rot ack_rot incoming header
0 – E 1 – W 2 – N 3 – S 4 – L Free 1 1 1 1 1 In
Out
♦ Tabela de conexão
♦ Quando uma conexão é estabelecida o caminho entre a porta de entrada e saída é armazenado
♦ Tres vetores são utilizados: IN, OUT, FREE
NoC Hermes
N(2) E(0) W(1) S(3) L(4) N (2) Buffer port 2 W(1) Buffer port 1…
…
h ack_h Arbiterreq_rot ack_rot incoming
Routing Logic
req_rot ack_rot incoming header
in out
♦ Tabela de conexão
♦ Quando uma conexão é estabelecida o caminho entre a porta de entrada e saída é armazenado
♦ Tres vetores são utilizados: IN, OUT, FREE
NoC Hermes
N(2) E(0) W(1) S(3) L(4) N (2) Buffer port 0…
…
h ack_h Arbiterreq_rot ack_rot incoming
Routing Logic
req_rot ack_rot incoming header
in out 0 – E 1 – W 2 – N 3 – S 4 – L Free 1 1 1 1 1 In Out S (3) W (1) Buffer port 1 N (2) 1
♦ Tabela de conexão
♦ Quando uma conexão é estabelecida o caminho entre a porta de entrada e saída é armazenado
♦ Tres vetores são utilizados: IN, OUT, FREE
NoC Hermes
N(2) E(0) W(1) S(3) L(4) N (2) Buffer port 0…
…
h ack_h Arbiterreq_rot ack_rot incoming
Routing Logic
req_rot ack_rot incoming header
in out S (3) W (1) Buffer port 1 0 – E 1 – W 2 – N 3 – S 4 – L Free 1 1 1 1 1 In Out N (2) 2 3
♦ Tabela de conexão
♦ Quando uma conexão é estabelecida o caminho entre a porta de entrada e saída é armazenado
♦ Tres vetores são utilizados: IN, OUT, FREE
NoC Hermes
N(2) E(0) W(1) S(3) L(4) N (2) Buffer port 0…
…
h ack_h Arbiterreq_rot ack_rot incoming
Routing Logic
req_rot ack_rot incoming header
in out 0 – E 1 – O 2 – N 3 – S 4 – L Free 1 1 0 1 1 In 3 Out 2 S (3) W (1) Buffer port 1 N (2) 4
0 – E 1 – W 2 – N 3 – S 4 – L Free 1 1 0 1 1 In 3
Out 2
♦ Tabela de conexão
♦ Quando uma conexão é estabelecida o caminho entre a porta de entrada e saída é armazenado
♦ Tres vetores são utilizados: IN, OUT, FREE
NoC Hermes
N(2) E(0) W(1) S(3) L(4) N (2) Buffer port 0…
…
h ack_h Arbiterreq_rot ack_rot incoming
Routing Logic
req_rot ack_rot incoming header
in out S (3) W (1) Buffer port 1 N (2) 5
0 – E 1 – W 2 – N 3 – S 4 – L Free 1 1 0 1 1 In 3
Out 2
♦ Tabela de conexão
♦ Quando uma conexão é estabelecida o caminho entre a porta de entrada e saída é armazenado
♦ Três vetores são utilizados: IN, OUT, FREE
NoC Hermes
N(2) E(0) W(1) S(3) L(4) N (2) Buffer port 0…
…
h ack_h Arbiterreq_rot ack_rot incoming
Routing Logic
req_rot ack_rot incoming header
in out S (3) W (1) Buffer port 1 N (2) 6
0 – E 1 – W 2 – N 3 – S 4 – L Free 1 0 0 1 1 In 2 3
Out 1 2
♦ Tabela de conexão
♦ Quando uma conexão é estabelecida o caminho entre a porta de entrada e saída é armazenado
♦ Tres vetores são utilizados: IN, OUT, FREE
NoC Hermes
N(2) E(0) W(1) S(3) L(4) N (2) Buffer port 0…
…
h ack_h Arbiterreq_rot ack_rot incoming
Routing Logic
req_rot ack_rot incoming header
in out S (3) W (1) Buffer port 1 N (2) 7 7
Estrutura do código
topNoC
• Instanciação de roteadores
• Conexão entre os sinais, com os devidos
aterramentos (portas não utilizadas)
• Instanciação de um módulo em SystemC para
Estrutura do código
Roteador
library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; use work.HermesPackage.all; entity RouterCC isgeneric( address: regmetadeflit); port( clock: in std_logic; reset: in std_logic; clock_rx: in regNport; rx: in regNport; data_in: in arrayNport_regflit; credit_o: out regNport;
clock_tx: out regNport; tx: out regNport;
data_out: out arrayNport_regflit; credit_i: in regNport);
end RouterCC;
architecture RouterCC of RouterCC is
signal h, ack_h, data_av, sender, data_ack: regNport := (others=>'0'); signal data: arrayNport_regflit := (others=>(others=>'0'));
signal mux_in, mux_out: arrayNport_reg3 := (others=>(others=>'0')); signal free: regNport := (others=>'0');
ROTEADOR clk_rx rx data_in credit_o clk_tx tx data_out credit_i East N o rt h S o u th Loca l clock
Estrutura do código
routerCC
beginFEast : Entity work.Hermes_buffer
port map(
FWest : Entity work.Hermes_buffer
port map(
FNorth : Entity work.Hermes_buffer
port map(
FSouth : Entity work.Hermes_buffer
port map(
FLocal : Entity work.Hermes_buffer
port map(
SwitchControl : Entity work.SwitchControl(AlgorithmXY) port map(
CrossBar : Entity work.Hermes_crossbar port map(
CLK_TX : for i in 0 to(NPORT-1) generate clock_tx(i) <= clock; end generate CLK_TX; end RouterCC; ROTEADOR clk_rx rx data_in credit_o clk_tx tx data_out credit_i East N o rt h S o u th Loca l clock
Roteador
BUFFER
clk_rx rx data_in credit_o clock h ack_h dataControle
sender clock addressfree mux_in mux_out
cross_bar
tx dat a_ o u t cr ed it _i Para as 5 portas: data_av Para as 5 portas de entrada: data_ackBuffer
BUFFER clk_rx rx data_in credit_o clock h ack_h data sender data_ack data_av resetINIT HEADER HEADERSEND PAYLOAD tem dado no buffer h <= 1 (*r)++ sender <= 1h <= 0 data_av <= 1 ack_h ~ack_h h <= 0 data_av <= 0 (*r)++ data_ack se há dado no buffer: data_av <= 1 se o dado foi consumido: { trata tam_pacote se final do pacote: { sender <= 0 data_av <=0 volta para INIT } senão: { (*r)++ continua em PAYLOAD } }
Buffer
FSM de controle
S0
S1
S2
S3
S5
S6
S4
S7
x y local sel <= prox ~ask aloca porta out fecha as tabelas roteamento Arbitra novamente caso a porta de saída esteja em uso ask resetTrabalhos para 06/maio
(1)
Luciano Caimi
e
Leonardo Juracy
• Aprender, fazer tutoriais e modelar a Hermes com
"Noxim - the NoC Simulator”
https://github.com/davidepatti/noxim
Trabalhos para 06/maio
(2) Rafael Krindges / Rafael Ribeiro
•
Output buffer
à
maior desempenho, a um custo
maior de área
• O flit ao entrar é roteado é enviado para um buffer de saída
(múltiplos buffers de saída)
• Uma arbitragem é feita entre os pedidos dos buffers e se
escolhe qual atender