SlideShare a Scribd company logo
A META MODEL SUPPORTING BOTH
HARDWARE AND SMALLTALK-BASED
EXECUTION OF FPGA CIRCUITS
Le Xuan Sang1,2
Loïc Lagadec1
, Luc Fabress2
,
Jannik Laval2
and Noury Bouraqadi2
1 Lab-STICC, ENSTA Bretagne
2 Institut Mines-Telecom, Mines Douai
ABOUT ME
• LE Xuan Sang
• 2014-2017 PHD student
• Coupling FPGA / Smalltalk
in robotic applications FPGA
Application
Processor
Abstraction Synthesis
Application
2
-- libraries declararion
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL ;
-- Entity declaration
entity SimpleALU is
port (
clk:in std_logic;
A,B:in std_logic_vector(31 downto 0);
opcode:in std_logic;
R:out std_logic_vector(31 downto 0)
);
end SimpleALU;
-- Architecture
architecture arch of SimpleALU is
Signal r1,r2,r3:signed(31 downto 0)
:=(others=>'0');
begin
r1<=signed(A);
r2<=signed(B);
R<=std_logic_vector(r3);
process(clk)
begin
if rising_edge(clk) then
case opcode is
when '0' => r3<=(r1+r2);
when '1' => r3<= r1 AND r2;
when others => (others=>'0');
end case;
end if;
end process;
end architecture;
DESCRIPTION OF A CIRCUIT USING VHDL
ALU
A
B
R
opcode
clk
Interface
3
Components
-- libraries declararion
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL ;
-- Entity declaration
entity SimpleALU is
port (
clk:in std_logic;
A,B:in std_logic_vector(31 downto 0);
opcode:in std_logic;
R:out std_logic_vector(31 downto 0)
);
end SimpleALU;
-- Architecture
architecture arch of SimpleALU is
Signal r1,r2,r3:signed(31 downto 0)
:=(others=>'0');
begin
r1<=signed(A);
r2<=signed(B);
R<=std_logic_vector(r3);
process(clk)
begin
if rising_edge(clk) then
case opcode is
when '0' => r3<=(r1+r2);
when '1' => r3<= r1 AND r2;
when others => (others=>'0');
end case;
end if;
end process;
end architecture;
DESCRIPTION OF A CIRCUIT USING VHDL
• Operated in parallel
• Activated when its inputs change
• Signals assignment alway need a
propagation delay to take effect
ALU
A
B
R
opcode
clk
Interface
3
FPGA CIRCUIT MODELLING
3 problems
(1) The meta-model must capture
both the structure and the
behaviour of the circuit
(2) The parallel characteristics +
propagation delay of the FPGA
circuits must be taken into
account
(3) Transparent execution of the
circuit on FPGA
4
1 alu := SimpleALU new.
2 alu A:20.
3 alu B:15.
4 alu opcode:false. "add"
5 alu execute.
6 alu R asInteger "35"
ALU
A
B
R
opcode
clk
Execute
on FPGA
FPGA available ?
Outputs
No Yes
3
2
1
Simulated
execution
on VM
FULL SOLUTION
VHDL
Legacy
VCD
VHDL
0110
Bit file
Low level
synthesis
FPGA
FX2Interface
MetaModel
Interface
Adapters
Export
er
VHDL
Co
m
piler
Synthesis
tools
D
SL
VHDLParser
Simulator
FFI
5
FULL SOLUTION
VHDL
Legacy
VCD
VHDL
0110
Bit file
Low level
synthesis
FPGA
FX2Interface
MetaModel
Interface
Adapters
Export
er
VHDL
Co
m
piler
Synthesis
tools
D
SL
VHDLParser
Simulator
FFI
5
FULL SOLUTION
VHDL
Legacy
VCD
VHDL
0110
Bit file
Low level
synthesis
FPGA
FX2Interface
MetaModel
Interface
Adapters
Export
er
VHDL
Co
m
piler
Synthesis
tools
D
SL
VHDLParser
Simulator
FFI
5
FULL SOLUTION
VHDL
Legacy
VCD
VHDL
0110
Bit file
Low level
synthesis
FPGA
FX2Interface
MetaModel
Interface
Adapters
Export
er
VHDL
Co
m
piler
Synthesis
tools
D
SL
VHDLParser
Simulator
FFI
5
FULL SOLUTION
VHDL
Legacy
VCD
VHDL
0110
Bit file
Low level
synthesis
FPGA
FX2Interface
MetaModel
Interface
Adapters
Export
er
VHDL
Co
m
piler
Synthesis
tools
D
SL
VHDLParser
Simulator
FFI
5
FULL SOLUTION
VHDL
Legacy
VCD
VHDL
0110
Bit file
Low level
synthesis
FPGA
FX2Interface
MetaModel
Interface
Adapters
Export
er
VHDL
Co
m
piler
Synthesis
tools
D
SL
VHDLParser
Simulator
FFI
5
SMALLTALK-BASED EXECUTION OF
THE FPGA CIRCUIT MODEL
EVENT-DRIVEN FOR PROPAGATION
EXECUTION
• All parallel components are considered as
processes with sensitivity list (event listener)
• The value of signals is changed only after
update
• Events occur on signals change
• All processes that have changed signals as
inputs will become active
• Execution of a triggered process may
trigger other processes
Update signals value
Determine events occur
Execute processes
triggered by events
Start
End
6
CIRCUIT MODEL EXECUTION
• Inputs ports are assigned at the
first time
• Each circuit has a done signal
• The circuit is triggered by the clock
clk
• The execution is repeated until the
done signal is asserted
alu := SimpleALU new.
alu A:20.
alu B:15.
alu opcode:false.
alu execute.
7
HARDWARE-BASED EXECUTION OF
THE FPGA CIRCUIT MODEL
AUTOMATIC DEPLOYEMENT ON FPGA
1. Generate automatically the
communication interface
2. TheVHDL codes is exported
from the model
3. The hardware configuration is
generated
4. The vendor tool-chain is used
for low level synthesis
SimpleALU
Interface
RA B opcode
Final circuit
Low level
synthesis
0110
Bit file
FPGA
VHDL HW. configuration
Export
Program
8
No effort for developper
HARDWARE BASED EXECUTION OF
CIRCUIT MODEL
1. The inputs signals are assigned
2. The input values are encode as
ByteArray and sent to FPGA
3. The interface circuit decodes the
data it received and sends to the
target circuit
4. The outputs of the circuit can be
fetched from Smalltalk in a
reverse way
#[<A>,<B>,<opcode>] #[<R>]
SimpleALU
RA B opcode
Interface
Pharo VM
9
CONTROLLABILITY AND DEBUGGING
POST-MORTEM ANALYSIS OF SIMULATION
• The circuit is executed for a
specific amount of time
• The inputs are changed at
some specific points of
time
• Next input changes are
stored in a time queue
• Timing information and
signals values are traced
continuously into aVCD file
alu := SimpleALU new.
queue := {
#clk clock: 50ns.
#A change:{1. 3. 5. 7} every:50ns.
#B change:{0. 2. 4. 6} every:50ns.
#opcode change:{'0'.'1'} every:100ns.
} asTimeQueueFor:400ns.
stream := WaveFormStream on:'ALU.vcd'.
alu modellingExecution:#execute timeQueue:queue
dumpOn:stream.
10
HARDWARE BREAKPOINT
• How can we manually stop the
execution of FPGA circuit ?
• Enables the software like debug
capabilities on hardware
11
HARDWARE BREAKPOINT
• How can we manually stop the
execution of FPGA circuit ?
• Enables the software like debug
capabilities on hardware
11
Target
circuit
Clock
controller
global clock
clk
HARDWARE BREAKPOINT
• How can we manually stop the
execution of FPGA circuit ?
• Enables the software like debug
capabilities on hardware
11
Target
circuit
Clock
controller
global clock
clk
STATIC BREAKPOINT
……
SimpleCounter>>execute
<hdl:#combinational>
{self clk. self reset. self start} onChange:
[
self reset = '1' ifTrue:[
cnt reset:'0'.
] ifFalse:[
self start = '1' ifTrue:[
cnt reset:'0'.
done <- false.
] ifFalse:[
cnt = 100 ifTrue:[
done <- true.
] ifFalse:[
cnt <- (cnt +1).]
cnt = 4 ifTrue:[
self halt.
]
]
]
]
dout <- cnt.
Halting
A simple counter
12
STATIC BREAKPOINT
……
SimpleCounter>>execute
<hdl:#combinational>
{self clk. self reset. self start} onChange:
[
self reset = '1' ifTrue:[
cnt reset:'0'.
] ifFalse:[
self start = '1' ifTrue:[
cnt reset:'0'.
done <- false.
] ifFalse:[
cnt = 100 ifTrue:[
done <- true.
] ifFalse:[
cnt <- (cnt +1).]
cnt = 4 ifTrue:[
self halt.
]
]
]
]
dout <- cnt.
Halting
• Need to re-synthesize the circuit
when changing
Interface
Target
circuit
Clock
controller
halt
global clock
clk
clock
counter
done
start
Inputs Output
12
A simple counter
DYNAMIC BREAKPOINT
obj := SimpleCounter new.
obj setBreakpointOn:#dout value:4.
obj enableBreakpointOn:#dout.
obj execute. "stop at breakpoint”
“set another breakpoint”
obj setBreakpointOn:#dout value:10.
obj resume. "resume the execution”
“stop when out = 10”
obj resume. "Continue”
13
• Future work
• Short term
• Extend the meta-model
• support software-
hardware co-simulation
• Long term
• Get closer to Smalltalk :
Smalltalk→FPGA
CONCLUSION AND FUTURE WORK
VHDL
Legacy
VCD
VHDL
0110
Bit file
Low level
synthesis
FPGA
FX2Interface
MetaModel
Interface
Adapters
Export
er
VHDL
Co
m
piler
Synthesis
tools
D
SL
VHDLParser
Simulator
FFI
14
A META MODEL SUPPORTING BOTH
HARDWARE AND SMALLTALK-BASED
EXECUTION OF FPGA CIRCUITS
Le Xuan Sang1,2
Loïc Lagadec1
, Luc Fabress2
,
Jannik Laval2
and Noury Bouraqadi2
1 Lab-STICC, ENSTA Bretagne
2 Institut Mines-Telecom, Mines Douai
1. Source code analysis.
2. Resource allocation.
3. Scheduling.
4. Resource binding
5. Generate appropriate interface between
application and the circuit
6. Modelling and simulation FPGA circuit at RTL level.
HIGH LEVEL SYNTHESIS
FRAMEWORK
Workingprogress
• Based on the IEEE 1076.66 RTL synthesis standard
(VHDL-87)
• Support almost anyVHDL structures in the
standard
• Each meta-description in the meta-model capture
both structure and behaviour of a circuit element
• Signals and Ports are modelled by objects with
history
META-MODEL (1)
Dedicated DSL for circuit description
META-MODEL (2)
HDLSketch subclass: #SimpleALU
instanceVariableNames: 'r1 r2 r3'
SimpleALU>>setUpPorts
self in:{#A.#B}of:(LogicVector size:32).
self in:#opcode of:Logic new.
self out:#R of:(LogicVector size:32)
SimpleALU>>setUpSignals
r1 := Signal of:(LogicVector size:32 signed:true).
r2 := Signal of:(LogicVector size:32 signed:true).
r3 := Signal of:(LogicVector size:32 signed:true).
SimpleALU>>execute
<hdl:#combinational>
r1 <- (self A).
r2 <- (self B).
self R <- r3.
{self clk} onChange:[
self done <- false.
self clk posedge ifTrue:[
self opcode caseOf: {
['0'] -> [r3 <- (r1 + r2)].
['1'] -> [r3 <- (r1 and:r2)].
}.
self done <- true.
]].
DSL
1 HDLSketch class » compile:text
2 classified:aCategory
3 notifying:requestor
4 |ast|
5 ast := self compiler parse: text.
6 (ast hasPragmaNamed: #hdl:) ifTrue:[
7 ModelBuilder for:self
8 ast:ast notificator:requestor.
9 ˆself compiledMethodFor:ast selector.
10 ].
11 ˆsuper compile:text
12 classified:aCategory
13 notifying:requestor.
Error
report
Syntax analysis
Model generation
Circuit checking
Executable code generation
error
Ok
Ok
error
• Reuse of Legacy VHDL
• A builtinVHDL Parser (based on PetitParser).
• Third-partyVHDL codes with respect to the
IEEE 1076.66 RTL standard can be converted
to our circuit-model.
• Updated: the converted circuit model now
can be simulated in our environment
META-MODEL (3)
EXAMPLE
HDLSketch subclass: #SimpleCounter
instanceVariableNames: 'cnt'
SimpleCounter>>setupPorts
self out:#dout of:(LogicVector size:32).
SimpleCounter>>setupSignals
cnt := Signal of:(LogicVector size:32).
SimpleCounter>>execute
<hdl:#combinational>
{self clk. self reset. self start} onChange:
[
self reset = '1' ifTrue:[
cnt reset:'0'.
] ifFalse:[
self start = '1' ifTrue:[
cnt reset:'0'.
done <- false.
] ifFalse:[
cnt = 100 ifTrue:[
done <- true.
] ifFalse:[
cnt <- (cnt +1).]
]
]
]
dout <- cnt.
A counter from 0 to 100
DYNAMIC BREAKPOINT
obj := SimpleCounter new.
obj setBreakpointOn:#dout value:4.
obj enableBreakpointOn:#dout.
obj execute. "stop at breakpoint"
obj resume. "resume the execution"
MUX
Target
circuit
=
=
=
output 1
output 2
output m
…
…
ref. 1
ref. 2
ref. m
select
Clock
controller break
global clock
resume
clk
Debug sub-circuit
start
done
clock
counter
Breakpoint controllerInterface
Inputs Outputs
13
DYNAMIC BREAKPOINT
obj := SimpleCounter new.
obj setBreakpointOn:#dout value:4.
obj enableBreakpointOn:#dout.
obj execute. "stop at breakpoint"
obj resume. "resume the execution"
MUX
Target
circuit
=
=
=
output 1
output 2
output m
…
…
ref. 1
ref. 2
ref. m
select
Clock
controller break
global clock
resume
clk
Debug sub-circuit
start
done
clock
counter
Breakpoint controllerInterface
Inputs Outputs
13
HDLCase
HDLMetaHDLData
HDLStatement
HDLComponent
HDLControlHDLOperation
HDLIfElse
HDLLoopHDLLMux
HDLProcess
HDLArithmeticHDLLogic
HDLLAssignment
HDLConditionalSelection
1
*
1
*
1*
1
*
ConcurentControl SequentialControl
1
*
1
*
HDLType
Signal
1
1
1
1
1
*
1
1
HDLArchitectureHDLEntity
HDLDesignEntry
Port
1
1
1
*
1
1
1
*
1
HDLStaticObject
1
*
1
Logic
LogicVector
model
HDLSketch 1
1

More Related Content

What's hot (20)

PDF
Digital system design lab manual
Santhosh Poralu
 
PPTX
RISC-V 30907 summit 2020 joint picocom_mentor
RISC-V International
 
PPTX
Lcd module interface with xilinx software using verilog
sumedh23
 
PDF
Basics of digital verilog design(alok singh kanpur)
Alok Singh
 
PDF
Keysight Mini-ICT - Testing Days México
Interlatin
 
PDF
VHDL Practical Exam Guide
Eslam Mohammed
 
PDF
Functional Test Systems - Testing Days Bajío
Interlatin
 
PDF
SIMD inside and outside Oracle 12c In Memory
Laurent Leturgez
 
PDF
Never Trust Your Inputs
Alexander Bolshev
 
PDF
Jtag presentation
klinetik
 
PDF
Boundary scan for support engineers and technicians
Interlatin
 
PPTX
How to design Programs using VHDL
Eutectics
 
PPTX
Tools for Practical Attacks on Analog-to-Digital Conversion
Alexander Bolshev
 
PDF
selected input/output - sensors and actuators
Eueung Mulyana
 
DOCX
32 bit ALU Chip Design using IBM 130nm process technology
Bharat Biyani
 
PPTX
Session1
omarAbdelrhman2
 
PDF
Connectivity for Local Sensors and Actuators Using nRF24L01+
Eueung Mulyana
 
PPTX
Testing CAN network with help of CANToolz
Alexey Sintsov
 
PDF
Verilog lab mauual
BHUSHAN MHASKE
 
PPTX
Online test program generator for RISC-V processors
RISC-V International
 
Digital system design lab manual
Santhosh Poralu
 
RISC-V 30907 summit 2020 joint picocom_mentor
RISC-V International
 
Lcd module interface with xilinx software using verilog
sumedh23
 
Basics of digital verilog design(alok singh kanpur)
Alok Singh
 
Keysight Mini-ICT - Testing Days México
Interlatin
 
VHDL Practical Exam Guide
Eslam Mohammed
 
Functional Test Systems - Testing Days Bajío
Interlatin
 
SIMD inside and outside Oracle 12c In Memory
Laurent Leturgez
 
Never Trust Your Inputs
Alexander Bolshev
 
Jtag presentation
klinetik
 
Boundary scan for support engineers and technicians
Interlatin
 
How to design Programs using VHDL
Eutectics
 
Tools for Practical Attacks on Analog-to-Digital Conversion
Alexander Bolshev
 
selected input/output - sensors and actuators
Eueung Mulyana
 
32 bit ALU Chip Design using IBM 130nm process technology
Bharat Biyani
 
Session1
omarAbdelrhman2
 
Connectivity for Local Sensors and Actuators Using nRF24L01+
Eueung Mulyana
 
Testing CAN network with help of CANToolz
Alexey Sintsov
 
Verilog lab mauual
BHUSHAN MHASKE
 
Online test program generator for RISC-V processors
RISC-V International
 

Viewers also liked (7)

PDF
Software metrics to predict the health of a project? - An assessment in a maj...
ESUG
 
PDF
Performance from Aligning Smalltalk & Javascript Classes
ESUG
 
ODP
Deltastreams
ESUG
 
PPT
Just in Time Resourcing
ESUG
 
PDF
Smalltalks 2008 Coding Contest
ESUG
 
PDF
Thales Smalltalk Usage: PicUnit
ESUG
 
PDF
DeltaImpact: Assessing semantic merge conflicts with Dependency Analysis
ESUG
 
Software metrics to predict the health of a project? - An assessment in a maj...
ESUG
 
Performance from Aligning Smalltalk & Javascript Classes
ESUG
 
Deltastreams
ESUG
 
Just in Time Resourcing
ESUG
 
Smalltalks 2008 Coding Contest
ESUG
 
Thales Smalltalk Usage: PicUnit
ESUG
 
DeltaImpact: Assessing semantic merge conflicts with Dependency Analysis
ESUG
 
Ad

Similar to A meta model supporting both hardware and smalltalk-based execution of FPGA circuits (20)

PDF
Fpga & VHDL
Francesco De Canio
 
PPTX
VLSI
MAYANK KUMAR
 
PPTX
FPGA workshop
Alex Borisevich
 
PPTX
VLSI
MAYANK KUMAR
 
PDF
Summer training vhdl
Arshit Rai
 
PPTX
ppt.pptx
19445KNithinbabu
 
PDF
8d545d46b1785a31eaab12d116e10ba41d996928Lecture%202%20and%203%20pdf (1).pdf
yatinsingh34
 
PPT
Summer training vhdl
Arshit Rai
 
PDF
Summer training vhdl
Arshit Rai
 
PPTX
Programming FPGA in electronic systems
Sharad Pandey
 
PPTX
Summer training vhdl
Arshit Rai
 
PDF
Syntutic
Rohit Chintu
 
PPTX
SoC FPGA Technology
Siraj Muhammad
 
PPTX
Seminar on field programmable gate array
Saransh Choudhary
 
PDF
Project report of 2016 Trainee_final
Akash Chowdhury
 
PPTX
Lecture 16 RC Architecture Types & FPGA Interns Lecturer.pptx
wafawafa52
 
PDF
Session 02 _rtl_design_with_vhdl 101
Mahmoud Abdellatif
 
PPT
Spdas2 vlsibput
GIET,Bhubaneswar
 
DOCX
Fpg as 11 body
Rameez Raja
 
Fpga & VHDL
Francesco De Canio
 
FPGA workshop
Alex Borisevich
 
Summer training vhdl
Arshit Rai
 
8d545d46b1785a31eaab12d116e10ba41d996928Lecture%202%20and%203%20pdf (1).pdf
yatinsingh34
 
Summer training vhdl
Arshit Rai
 
Summer training vhdl
Arshit Rai
 
Programming FPGA in electronic systems
Sharad Pandey
 
Summer training vhdl
Arshit Rai
 
Syntutic
Rohit Chintu
 
SoC FPGA Technology
Siraj Muhammad
 
Seminar on field programmable gate array
Saransh Choudhary
 
Project report of 2016 Trainee_final
Akash Chowdhury
 
Lecture 16 RC Architecture Types & FPGA Interns Lecturer.pptx
wafawafa52
 
Session 02 _rtl_design_with_vhdl 101
Mahmoud Abdellatif
 
Spdas2 vlsibput
GIET,Bhubaneswar
 
Fpg as 11 body
Rameez Raja
 
Ad

More from ESUG (20)

PDF
Words words words... Automatic detection of word repetition
ESUG
 
PDF
ShowUs: Compiling with inlining Druid + Opal = DrOpal
ESUG
 
PDF
Show us your Prokject #esug2024: "Gregg Shorthand"
ESUG
 
PDF
Slides from ShowUs #esug2024: "QuickTalk: Multicultural Microwiki"
ESUG
 
PDF
Pharo GitLab Example: This is a simple Pharo Smalltalk pipeline example
ESUG
 
PDF
Show us your Project @ ESUG2024: Security cards
ESUG
 
PDF
Phausto: fast and accessible DSP programming for sound and music creation in ...
ESUG
 
PDF
Modest-Pharo: Unit Test Generation Based on Traces and Metamodels
ESUG
 
PDF
GLOSS - A GLSP1 Model Server on the Smalltalk Platform
ESUG
 
PDF
Smalltalk JIT Compilation: LLVM Experimentation
ESUG
 
PDF
Towards resilience against highly dynamic challenges for Wireless Sensor Netw...
ESUG
 
PDF
SoSAF: A Pharo-Based Framework for Enhancing System-Of-Systems Dependencies A...
ESUG
 
PDF
Pyramidion : a framework for Domain-Specific Editor
ESUG
 
PDF
Intentional Benchmarking of Dynamic Languages
ESUG
 
PDF
MethodProxies: A Safe and Fast Message-Passing Control Library
ESUG
 
PDF
Runtime Type Collection and its usage in Code Transpiling
ESUG
 
PDF
Inlined Code Generation for Smalltalk. From IWST2024
ESUG
 
PDF
Redesigning FFI calls in Pharo: Exploiting the baseline JIT for more performa...
ESUG
 
PDF
gt4llm: Software Development with LLMs in Glamorous Toolkit
ESUG
 
PDF
Attack chains construction: Towards detecting and preventing Pharo vulnerabil...
ESUG
 
Words words words... Automatic detection of word repetition
ESUG
 
ShowUs: Compiling with inlining Druid + Opal = DrOpal
ESUG
 
Show us your Prokject #esug2024: "Gregg Shorthand"
ESUG
 
Slides from ShowUs #esug2024: "QuickTalk: Multicultural Microwiki"
ESUG
 
Pharo GitLab Example: This is a simple Pharo Smalltalk pipeline example
ESUG
 
Show us your Project @ ESUG2024: Security cards
ESUG
 
Phausto: fast and accessible DSP programming for sound and music creation in ...
ESUG
 
Modest-Pharo: Unit Test Generation Based on Traces and Metamodels
ESUG
 
GLOSS - A GLSP1 Model Server on the Smalltalk Platform
ESUG
 
Smalltalk JIT Compilation: LLVM Experimentation
ESUG
 
Towards resilience against highly dynamic challenges for Wireless Sensor Netw...
ESUG
 
SoSAF: A Pharo-Based Framework for Enhancing System-Of-Systems Dependencies A...
ESUG
 
Pyramidion : a framework for Domain-Specific Editor
ESUG
 
Intentional Benchmarking of Dynamic Languages
ESUG
 
MethodProxies: A Safe and Fast Message-Passing Control Library
ESUG
 
Runtime Type Collection and its usage in Code Transpiling
ESUG
 
Inlined Code Generation for Smalltalk. From IWST2024
ESUG
 
Redesigning FFI calls in Pharo: Exploiting the baseline JIT for more performa...
ESUG
 
gt4llm: Software Development with LLMs in Glamorous Toolkit
ESUG
 
Attack chains construction: Towards detecting and preventing Pharo vulnerabil...
ESUG
 

Recently uploaded (20)

PDF
NASA A Researcher’s Guide to International Space Station : Earth Observations
Dr. PANKAJ DHUSSA
 
PPTX
Essential Content-centric Plugins for your Website
Laura Byrne
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
[GDGoC FPTU] Spring 2025 Summary Slidess
minhtrietgect
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
Linux schedulers for fun and profit with SchedKit
Alessio Biancalana
 
PDF
NASA A Researcher’s Guide to International Space Station : Fundamental Physics
Dr. PANKAJ DHUSSA
 
PDF
Home Cleaning App Development Services.pdf
V3cube
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
NASA A Researcher’s Guide to International Space Station : Earth Observations
Dr. PANKAJ DHUSSA
 
Essential Content-centric Plugins for your Website
Laura Byrne
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
[GDGoC FPTU] Spring 2025 Summary Slidess
minhtrietgect
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Linux schedulers for fun and profit with SchedKit
Alessio Biancalana
 
NASA A Researcher’s Guide to International Space Station : Fundamental Physics
Dr. PANKAJ DHUSSA
 
Home Cleaning App Development Services.pdf
V3cube
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 

A meta model supporting both hardware and smalltalk-based execution of FPGA circuits

  • 1. A META MODEL SUPPORTING BOTH HARDWARE AND SMALLTALK-BASED EXECUTION OF FPGA CIRCUITS Le Xuan Sang1,2 Loïc Lagadec1 , Luc Fabress2 , Jannik Laval2 and Noury Bouraqadi2 1 Lab-STICC, ENSTA Bretagne 2 Institut Mines-Telecom, Mines Douai
  • 2. ABOUT ME • LE Xuan Sang • 2014-2017 PHD student • Coupling FPGA / Smalltalk in robotic applications FPGA Application Processor Abstraction Synthesis Application 2
  • 3. -- libraries declararion library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL ; -- Entity declaration entity SimpleALU is port ( clk:in std_logic; A,B:in std_logic_vector(31 downto 0); opcode:in std_logic; R:out std_logic_vector(31 downto 0) ); end SimpleALU; -- Architecture architecture arch of SimpleALU is Signal r1,r2,r3:signed(31 downto 0) :=(others=>'0'); begin r1<=signed(A); r2<=signed(B); R<=std_logic_vector(r3); process(clk) begin if rising_edge(clk) then case opcode is when '0' => r3<=(r1+r2); when '1' => r3<= r1 AND r2; when others => (others=>'0'); end case; end if; end process; end architecture; DESCRIPTION OF A CIRCUIT USING VHDL ALU A B R opcode clk Interface 3
  • 4. Components -- libraries declararion library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL ; -- Entity declaration entity SimpleALU is port ( clk:in std_logic; A,B:in std_logic_vector(31 downto 0); opcode:in std_logic; R:out std_logic_vector(31 downto 0) ); end SimpleALU; -- Architecture architecture arch of SimpleALU is Signal r1,r2,r3:signed(31 downto 0) :=(others=>'0'); begin r1<=signed(A); r2<=signed(B); R<=std_logic_vector(r3); process(clk) begin if rising_edge(clk) then case opcode is when '0' => r3<=(r1+r2); when '1' => r3<= r1 AND r2; when others => (others=>'0'); end case; end if; end process; end architecture; DESCRIPTION OF A CIRCUIT USING VHDL • Operated in parallel • Activated when its inputs change • Signals assignment alway need a propagation delay to take effect ALU A B R opcode clk Interface 3
  • 5. FPGA CIRCUIT MODELLING 3 problems (1) The meta-model must capture both the structure and the behaviour of the circuit (2) The parallel characteristics + propagation delay of the FPGA circuits must be taken into account (3) Transparent execution of the circuit on FPGA 4 1 alu := SimpleALU new. 2 alu A:20. 3 alu B:15. 4 alu opcode:false. "add" 5 alu execute. 6 alu R asInteger "35" ALU A B R opcode clk Execute on FPGA FPGA available ? Outputs No Yes 3 2 1 Simulated execution on VM
  • 6. FULL SOLUTION VHDL Legacy VCD VHDL 0110 Bit file Low level synthesis FPGA FX2Interface MetaModel Interface Adapters Export er VHDL Co m piler Synthesis tools D SL VHDLParser Simulator FFI 5
  • 7. FULL SOLUTION VHDL Legacy VCD VHDL 0110 Bit file Low level synthesis FPGA FX2Interface MetaModel Interface Adapters Export er VHDL Co m piler Synthesis tools D SL VHDLParser Simulator FFI 5
  • 8. FULL SOLUTION VHDL Legacy VCD VHDL 0110 Bit file Low level synthesis FPGA FX2Interface MetaModel Interface Adapters Export er VHDL Co m piler Synthesis tools D SL VHDLParser Simulator FFI 5
  • 9. FULL SOLUTION VHDL Legacy VCD VHDL 0110 Bit file Low level synthesis FPGA FX2Interface MetaModel Interface Adapters Export er VHDL Co m piler Synthesis tools D SL VHDLParser Simulator FFI 5
  • 10. FULL SOLUTION VHDL Legacy VCD VHDL 0110 Bit file Low level synthesis FPGA FX2Interface MetaModel Interface Adapters Export er VHDL Co m piler Synthesis tools D SL VHDLParser Simulator FFI 5
  • 11. FULL SOLUTION VHDL Legacy VCD VHDL 0110 Bit file Low level synthesis FPGA FX2Interface MetaModel Interface Adapters Export er VHDL Co m piler Synthesis tools D SL VHDLParser Simulator FFI 5
  • 12. SMALLTALK-BASED EXECUTION OF THE FPGA CIRCUIT MODEL
  • 13. EVENT-DRIVEN FOR PROPAGATION EXECUTION • All parallel components are considered as processes with sensitivity list (event listener) • The value of signals is changed only after update • Events occur on signals change • All processes that have changed signals as inputs will become active • Execution of a triggered process may trigger other processes Update signals value Determine events occur Execute processes triggered by events Start End 6
  • 14. CIRCUIT MODEL EXECUTION • Inputs ports are assigned at the first time • Each circuit has a done signal • The circuit is triggered by the clock clk • The execution is repeated until the done signal is asserted alu := SimpleALU new. alu A:20. alu B:15. alu opcode:false. alu execute. 7
  • 15. HARDWARE-BASED EXECUTION OF THE FPGA CIRCUIT MODEL
  • 16. AUTOMATIC DEPLOYEMENT ON FPGA 1. Generate automatically the communication interface 2. TheVHDL codes is exported from the model 3. The hardware configuration is generated 4. The vendor tool-chain is used for low level synthesis SimpleALU Interface RA B opcode Final circuit Low level synthesis 0110 Bit file FPGA VHDL HW. configuration Export Program 8 No effort for developper
  • 17. HARDWARE BASED EXECUTION OF CIRCUIT MODEL 1. The inputs signals are assigned 2. The input values are encode as ByteArray and sent to FPGA 3. The interface circuit decodes the data it received and sends to the target circuit 4. The outputs of the circuit can be fetched from Smalltalk in a reverse way #[<A>,<B>,<opcode>] #[<R>] SimpleALU RA B opcode Interface Pharo VM 9
  • 19. POST-MORTEM ANALYSIS OF SIMULATION • The circuit is executed for a specific amount of time • The inputs are changed at some specific points of time • Next input changes are stored in a time queue • Timing information and signals values are traced continuously into aVCD file alu := SimpleALU new. queue := { #clk clock: 50ns. #A change:{1. 3. 5. 7} every:50ns. #B change:{0. 2. 4. 6} every:50ns. #opcode change:{'0'.'1'} every:100ns. } asTimeQueueFor:400ns. stream := WaveFormStream on:'ALU.vcd'. alu modellingExecution:#execute timeQueue:queue dumpOn:stream. 10
  • 20. HARDWARE BREAKPOINT • How can we manually stop the execution of FPGA circuit ? • Enables the software like debug capabilities on hardware 11
  • 21. HARDWARE BREAKPOINT • How can we manually stop the execution of FPGA circuit ? • Enables the software like debug capabilities on hardware 11 Target circuit Clock controller global clock clk
  • 22. HARDWARE BREAKPOINT • How can we manually stop the execution of FPGA circuit ? • Enables the software like debug capabilities on hardware 11 Target circuit Clock controller global clock clk
  • 23. STATIC BREAKPOINT …… SimpleCounter>>execute <hdl:#combinational> {self clk. self reset. self start} onChange: [ self reset = '1' ifTrue:[ cnt reset:'0'. ] ifFalse:[ self start = '1' ifTrue:[ cnt reset:'0'. done <- false. ] ifFalse:[ cnt = 100 ifTrue:[ done <- true. ] ifFalse:[ cnt <- (cnt +1).] cnt = 4 ifTrue:[ self halt. ] ] ] ] dout <- cnt. Halting A simple counter 12
  • 24. STATIC BREAKPOINT …… SimpleCounter>>execute <hdl:#combinational> {self clk. self reset. self start} onChange: [ self reset = '1' ifTrue:[ cnt reset:'0'. ] ifFalse:[ self start = '1' ifTrue:[ cnt reset:'0'. done <- false. ] ifFalse:[ cnt = 100 ifTrue:[ done <- true. ] ifFalse:[ cnt <- (cnt +1).] cnt = 4 ifTrue:[ self halt. ] ] ] ] dout <- cnt. Halting • Need to re-synthesize the circuit when changing Interface Target circuit Clock controller halt global clock clk clock counter done start Inputs Output 12 A simple counter
  • 25. DYNAMIC BREAKPOINT obj := SimpleCounter new. obj setBreakpointOn:#dout value:4. obj enableBreakpointOn:#dout. obj execute. "stop at breakpoint” “set another breakpoint” obj setBreakpointOn:#dout value:10. obj resume. "resume the execution” “stop when out = 10” obj resume. "Continue” 13
  • 26. • Future work • Short term • Extend the meta-model • support software- hardware co-simulation • Long term • Get closer to Smalltalk : Smalltalk→FPGA CONCLUSION AND FUTURE WORK VHDL Legacy VCD VHDL 0110 Bit file Low level synthesis FPGA FX2Interface MetaModel Interface Adapters Export er VHDL Co m piler Synthesis tools D SL VHDLParser Simulator FFI 14
  • 27. A META MODEL SUPPORTING BOTH HARDWARE AND SMALLTALK-BASED EXECUTION OF FPGA CIRCUITS Le Xuan Sang1,2 Loïc Lagadec1 , Luc Fabress2 , Jannik Laval2 and Noury Bouraqadi2 1 Lab-STICC, ENSTA Bretagne 2 Institut Mines-Telecom, Mines Douai
  • 28. 1. Source code analysis. 2. Resource allocation. 3. Scheduling. 4. Resource binding 5. Generate appropriate interface between application and the circuit 6. Modelling and simulation FPGA circuit at RTL level. HIGH LEVEL SYNTHESIS FRAMEWORK Workingprogress
  • 29. • Based on the IEEE 1076.66 RTL synthesis standard (VHDL-87) • Support almost anyVHDL structures in the standard • Each meta-description in the meta-model capture both structure and behaviour of a circuit element • Signals and Ports are modelled by objects with history META-MODEL (1)
  • 30. Dedicated DSL for circuit description META-MODEL (2) HDLSketch subclass: #SimpleALU instanceVariableNames: 'r1 r2 r3' SimpleALU>>setUpPorts self in:{#A.#B}of:(LogicVector size:32). self in:#opcode of:Logic new. self out:#R of:(LogicVector size:32) SimpleALU>>setUpSignals r1 := Signal of:(LogicVector size:32 signed:true). r2 := Signal of:(LogicVector size:32 signed:true). r3 := Signal of:(LogicVector size:32 signed:true). SimpleALU>>execute <hdl:#combinational> r1 <- (self A). r2 <- (self B). self R <- r3. {self clk} onChange:[ self done <- false. self clk posedge ifTrue:[ self opcode caseOf: { ['0'] -> [r3 <- (r1 + r2)]. ['1'] -> [r3 <- (r1 and:r2)]. }. self done <- true. ]]. DSL 1 HDLSketch class » compile:text 2 classified:aCategory 3 notifying:requestor 4 |ast| 5 ast := self compiler parse: text. 6 (ast hasPragmaNamed: #hdl:) ifTrue:[ 7 ModelBuilder for:self 8 ast:ast notificator:requestor. 9 ˆself compiledMethodFor:ast selector. 10 ]. 11 ˆsuper compile:text 12 classified:aCategory 13 notifying:requestor. Error report Syntax analysis Model generation Circuit checking Executable code generation error Ok Ok error
  • 31. • Reuse of Legacy VHDL • A builtinVHDL Parser (based on PetitParser). • Third-partyVHDL codes with respect to the IEEE 1076.66 RTL standard can be converted to our circuit-model. • Updated: the converted circuit model now can be simulated in our environment META-MODEL (3)
  • 32. EXAMPLE HDLSketch subclass: #SimpleCounter instanceVariableNames: 'cnt' SimpleCounter>>setupPorts self out:#dout of:(LogicVector size:32). SimpleCounter>>setupSignals cnt := Signal of:(LogicVector size:32). SimpleCounter>>execute <hdl:#combinational> {self clk. self reset. self start} onChange: [ self reset = '1' ifTrue:[ cnt reset:'0'. ] ifFalse:[ self start = '1' ifTrue:[ cnt reset:'0'. done <- false. ] ifFalse:[ cnt = 100 ifTrue:[ done <- true. ] ifFalse:[ cnt <- (cnt +1).] ] ] ] dout <- cnt. A counter from 0 to 100
  • 33. DYNAMIC BREAKPOINT obj := SimpleCounter new. obj setBreakpointOn:#dout value:4. obj enableBreakpointOn:#dout. obj execute. "stop at breakpoint" obj resume. "resume the execution" MUX Target circuit = = = output 1 output 2 output m … … ref. 1 ref. 2 ref. m select Clock controller break global clock resume clk Debug sub-circuit start done clock counter Breakpoint controllerInterface Inputs Outputs 13
  • 34. DYNAMIC BREAKPOINT obj := SimpleCounter new. obj setBreakpointOn:#dout value:4. obj enableBreakpointOn:#dout. obj execute. "stop at breakpoint" obj resume. "resume the execution" MUX Target circuit = = = output 1 output 2 output m … … ref. 1 ref. 2 ref. m select Clock controller break global clock resume clk Debug sub-circuit start done clock counter Breakpoint controllerInterface Inputs Outputs 13