Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
dmt
Commits
13287df3
Commit
13287df3
authored
May 21, 2020
by
Laura Alexandra Sequeira Gouveia
Browse files
Zynq 7000 Mapper: update to allow for proper rebuild process.
parent
26282be3
Changes
2
Hide whitespace changes
Inline
Side-by-side
dmt/B_mappers/vhdlTemplateZynQZC706.py
View file @
13287df3
...
...
@@ -313,9 +313,12 @@ end rtl;'''
makefile
=
r
'''
SRCS=../ip/src/TASTE_AXI.vhd ../ip/src/%(pi)s
EXEC=./TASTE/TASTE.runs/impl_1/TASTE_wrapper.bit
all: ${SRCS}
%(tab)svivado -mode batch -source TASTE_AXI.tcl
all: ${EXEC}
${EXEC}: ${SRCS}
vivado -mode batch -source TASTE_AXI.tcl
clean:
%(tab)srm -rf *.bit
...
...
@@ -388,7 +391,7 @@ use IEEE.STD_LOGIC_UNSIGNED.ALL;
%(declaration)s
architecture arch of
bambu_
%(pi)s is
architecture arch of %(pi)s
_bambu
is
-- Declare signals
signal CLK : std_logic;
...
...
dmt/B_mappers/zynqzc706_B_mapper.py
View file @
13287df3
...
...
@@ -1356,7 +1356,7 @@ def OnFinal() -> None:
completions
.
append
(
c
.
_spCleanName
+
'_done'
)
starts
.
append
(
c
.
_spCleanName
+
'_start'
)
AddToStr
(
'circuits'
,
' component bambu
_%s
is
\n
'
%
c
.
_spCleanName
)
AddToStr
(
'circuits'
,
' component
%s_
bambu is
\n
'
%
c
.
_spCleanName
)
AddToStr
(
'circuits'
,
' port (
\n
'
)
AddToStr
(
'circuits'
,
'
\n
'
.
join
([
' '
+
x
for
x
in
circuitLines
])
+
'
\n
'
)
AddToStr
(
'circuits'
,
' start_%s : in std_logic;
\n
'
%
c
.
_spCleanName
)
...
...
@@ -1367,7 +1367,7 @@ def OnFinal() -> None:
AddToStr
(
'circuits'
,
' end component;
\n\n
'
)
skeleton
=
[]
skeleton
.
append
(
' entity bambu
_%s
is
\n
'
%
c
.
_spCleanName
)
skeleton
.
append
(
' entity
%s_
bambu is
\n
'
%
c
.
_spCleanName
)
skeleton
.
append
(
' port (
\n
'
)
skeleton
.
append
(
'
\n
'
.
join
([
' '
+
x
for
x
in
circuitLines
])
+
'
\n
'
)
skeleton
.
append
(
' start_%s : in std_logic;
\n
'
%
c
.
_spCleanName
)
...
...
@@ -1375,8 +1375,8 @@ def OnFinal() -> None:
skeleton
.
append
(
' clock_%s : in std_logic;
\n
'
%
c
.
_spCleanName
)
skeleton
.
append
(
' reset_%s : in std_logic
\n
'
%
c
.
_spCleanName
)
skeleton
.
append
(
' );
\n
'
)
skeleton
.
append
(
' end bambu
_%s
;
\n\n
'
%
c
.
_spCleanName
)
vhdlSkeleton
=
open
(
vhdlBackend
.
dir
+
"/TASTE-VHDL-DESIGN/ip/src/
bambu_
"
+
c
.
_spCleanName
+
'.vhd'
,
'w'
)
skeleton
.
append
(
' end
%s_
bambu;
\n\n
'
%
c
.
_spCleanName
)
vhdlSkeleton
=
open
(
vhdlBackend
.
dir
+
"/TASTE-VHDL-DESIGN/ip/src/"
+
c
.
_spCleanName
+
'
_bambu
.vhd'
,
'w'
)
vhdlSkeleton
.
write
(
vhdlTemplateZynQZC706
.
per_circuit_vhd
%
{
'pi'
:
c
.
_spCleanName
,
...
...
@@ -1435,7 +1435,7 @@ def OnFinal() -> None:
AddToStr
(
'writeoutputdata'
,
'when (%s) => v_comb_out.rdata(31 downto 0) := X"000000" & "0000000" & AXI_SLAVE_CTRL_r.done;
\n
'
%
(
0x0300
+
c
.
_offset
))
AddToStr
(
'writeoutputdata'
,
'
\n
'
.
join
([
'
\t
'
*
5
+
x
for
x
in
writeoutputdataLines
])
+
'
\n
'
)
AddToStr
(
'connectionsToSystemC'
,
'
\n
Interface_%s : bambu
_%s
\n
'
%
(
c
.
_spCleanName
,
c
.
_spCleanName
))
AddToStr
(
'connectionsToSystemC'
,
'
\n
Interface_%s :
%s_
bambu
\n
'
%
(
c
.
_spCleanName
,
c
.
_spCleanName
))
AddToStr
(
'connectionsToSystemC'
,
' port map (
\n
'
)
AddToStr
(
'connectionsToSystemC'
,
',
\n
'
.
join
([
' '
+
x
for
x
in
connectionsToSystemCLines
])
+
',
\n
'
)
AddToStr
(
'connectionsToSystemC'
,
' start_%s => %s_start,
\n
'
%
(
c
.
_spCleanName
,
c
.
_spCleanName
))
...
...
@@ -1467,7 +1467,7 @@ def OnFinal() -> None:
msg
=
""
for
c
in
VHDL_Circuit
.
allCircuits
:
msg
+=
'bambu
_%s
.vhd'
%
c
.
_spCleanName
msg
+=
'
%s_
bambu.vhd'
%
c
.
_spCleanName
makefile
=
open
(
vhdlBackend
.
dir
+
'/TASTE-VHDL-DESIGN/project/Makefile'
,
'w'
)
makefile
.
write
(
vhdlTemplateZynQZC706
.
makefile
%
{
'pi'
:
msg
,
'tab'
:
'
\t
'
})
makefile
.
close
()
...
...
@@ -1791,11 +1791,12 @@ def EmitBambuSimulinkBridge(sp: ApLevelContainer, subProgramImplementation: str)
bambuFile
.
write
(
"#include
\"
%s.h
\"
// Space certified compiler generated
\n
"
%
vhdlBackend
.
asn_name
)
bambuFile
.
write
(
"#include
\"
%s.h
\"\n
"
%
vhdlBackend
.
CleanNameAsToolWants
(
sp
.
_id
))
bambuFile
.
write
(
"#include
\"
%s_types.h
\"\n\n
"
%
vhdlBackend
.
CleanNameAsToolWants
(
sp
.
_id
))
bambuFile
.
write
(
"#include
\"
%s.c
\"\n
"
%
vhdlBackend
.
CleanNameAsToolWants
(
sp
.
_id
))
#TODO can be added later for optimization (and these 2 files can then be removed from Bambu call
#bambuFile.write("#include \"%s.c\"\n\n" % vhdlBackend.CleanNameAsToolWants(sp._id))
#bambuFile.write("#include \"%s_data.c\"\n\n" % vhdlBackend.CleanNameAsToolWants(sp._id))
bambuFile
.
write
(
'void bambu
_%s
(
\n
'
%
sp
.
_id
)
bambuFile
.
write
(
'void
%s_
bambu(
\n
'
%
sp
.
_id
)
lines
=
[]
for
param
in
sp
.
_params
:
lines
.
extend
(
...
...
@@ -1863,9 +1864,10 @@ def EmitBambuCBridge(sp: ApLevelContainer, subProgramImplementation: str):
bambuFile
.
write
(
"#include
\"
%s.h
\"
// Space certified compiler generated
\n
"
%
vhdlBackend
.
asn_name
)
bambuFile
.
write
(
"#include
\"
%s.h
\"\n
"
%
functionBlocksName
)
bambuFile
.
write
(
"#include
\"
%s.c
\"\n
"
%
functionBlocksName
)
bambuFile
.
write
(
'
\n
void bambu
_%s
(
\n
'
%
sp
.
_id
)
bambuFile
.
write
(
'
\n
void
%s_
bambu(
\n
'
%
sp
.
_id
)
# List flattened PI parameters
lines
=
[]
for
param
in
sp
.
_params
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment