Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
be05c331
Commit
be05c331
authored
Feb 11, 2019
by
Jaco Hofmann
Committed by
Jaco A. Hofmann
May 08, 2019
Browse files
Add parameter to set a custom board repository path
- Paramter is boardPartRepository in JSON - Closes
#46
parent
8b7a8d0d
Changes
4
Hide whitespace changes
Inline
Side-by-side
common/design.master.tcl.template
View file @
be05c331
...
...
@@ -53,6 +53,9 @@ set bitstreamname @@BITSTREAM_NAME@@
# setup the project
create_project @@PROJECT_NAME@@ [pwd]/@@PROJECT_NAME@@ -part {@@PART@@} -force
if {"@@BOARD_PART@@" != ""} {
if {"@@BOARD_PART_REPOSITORY@@" != ""} {
set_property BOARD_PART_REPO_PATHS {@@BOARD_PART_REPOSITORY@@} [current_project]
}
set_property board_part {@@BOARD_PART@@} [current_project]
}
...
...
src/main/scala/tapasco/activity/composers/VivadoComposer.scala
View file @
be05c331
...
...
@@ -138,16 +138,17 @@ class VivadoComposer()(implicit cfg: Configuration) extends Composer {
composition
:
String
)
:
Unit
=
{
// needles for template
val
needles
:
scala.collection.mutable.Map
[
String
,
String
]
=
scala
.
collection
.
mutable
.
Map
(
"PROJECT_NAME"
->
"microarch"
,
"BITSTREAM_NAME"
->
projectName
,
"HEADER"
->
header
,
"PRELOAD_FILES"
->
""
,
"PART"
->
target
.
pd
.
part
,
"BOARD_PART"
->
(
target
.
pd
.
boardPart
getOrElse
""
),
"BOARD_PRESET"
->
(
target
.
pd
.
boardPreset
getOrElse
""
),
"PLATFORM_TCL"
->
target
.
pd
.
tclLibrary
.
toString
,
"ARCHITECTURE_TCL"
->
target
.
ad
.
tclLibrary
.
toString
,
"COMPOSITION"
->
composition
"PROJECT_NAME"
->
"microarch"
,
"BITSTREAM_NAME"
->
projectName
,
"HEADER"
->
header
,
"PRELOAD_FILES"
->
""
,
"PART"
->
target
.
pd
.
part
,
"BOARD_PART"
->
(
target
.
pd
.
boardPart
getOrElse
""
),
"BOARD_PART_REPOSITORY"
->
(
target
.
pd
.
boardPartRepository
getOrElse
""
),
"BOARD_PRESET"
->
(
target
.
pd
.
boardPreset
getOrElse
""
),
"PLATFORM_TCL"
->
target
.
pd
.
tclLibrary
.
toString
,
"ARCHITECTURE_TCL"
->
target
.
ad
.
tclLibrary
.
toString
,
"COMPOSITION"
->
composition
,
)
// write Tcl script
...
...
src/main/scala/tapasco/base/Platform.scala
View file @
be05c331
...
...
@@ -34,6 +34,7 @@ case class Platform (
part
:
String
,
boardPart
:
Option
[
String
],
boardPreset
:
Option
[
String
],
boardPartRepository
:
Option
[
String
],
targetUtilization
:
Int
,
supportedFrequencies
:
Seq
[
Int
],
private
val
_slotCount
:
Option
[
Int
],
...
...
src/main/scala/tapasco/base/json/package.scala
View file @
be05c331
...
...
@@ -331,6 +331,7 @@ def readMapFromFile(p: Path): JsResult[Feature.FMap] ={
(
JsPath
\
"Part"
).
read
[
String
]
(
minLength
[
String
](
1
))
~
(
JsPath
\
"BoardPart"
).
readNullable
[
String
]
(
minLength
[
String
](
4
))
~
(
JsPath
\
"BoardPreset"
).
readNullable
[
String
]
(
minLength
[
String
](
4
))
~
(
JsPath
\
"BoardPartRepository"
).
readNullable
[
String
]
(
minLength
[
String
](
4
))
~
(
JsPath
\
"TargetUtilization"
).
read
[
Int
]
(
min
(
5
)
keepAnd
max
(
100
))
~
(
JsPath
\
"SupportedFrequencies"
).
readNullable
[
Seq
[
Int
]]
(
minLength
[
Seq
[
Int
]](
1
))
.
map
(
_
getOrElse
(
50
to
450
by
5
))
~
(
JsPath
\
"SlotCount"
).
readNullable
[
Int
]
(
min
(
1
)
keepAnd
max
(
255
))
~
...
...
@@ -347,6 +348,7 @@ def readMapFromFile(p: Path): JsResult[Feature.FMap] ={
(
JsPath
\
"Part"
).
write
[
String
]
~
(
JsPath
\
"BoardPart"
).
writeNullable
[
String
]
~
(
JsPath
\
"BoardPreset"
).
writeNullable
[
String
]
~
(
JsPath
\
"BoardPartRepository"
).
writeNullable
[
String
]
~
(
JsPath
\
"TargetUtilization"
).
write
[
Int
]
~
(
JsPath
\
"SupportedFrequencies"
).
write
[
Seq
[
Int
]]
~
(
JsPath
\
"SlotCount"
).
writeNullable
[
Int
]
~
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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