Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
NanoSoC Tech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SoCLabs
NanoSoC Tech
Commits
ea74e1f0
Commit
ea74e1f0
authored
1 year ago
by
dam1n19
Browse files
Options
Downloads
Patches
Plain Diff
STarted to generalise build_design
parent
48ff7391
No related branches found
No related tags found
1 merge request
!1
changed imem to rom to allow initial program loading, updated bootloader code...
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fpga/build_design.tcl
+10
-6
10 additions, 6 deletions
fpga/build_design.tcl
fpga/makefile
+4
-1
4 additions, 1 deletion
fpga/makefile
with
14 additions
and
7 deletions
fpga/build_
nanosoc_
design.tcl
→
fpga/build_design.tcl
+
10
−
6
View file @
ea74e1f0
###-----------------------------------------------------------------------------
### Build FPGA Script
### Build
Design Viviado
FPGA Script
### A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license.
###
### Contributors
...
...
@@ -24,6 +24,9 @@ set socket_lib $env(FPGA_SOCKET_LIB)
set nanosoc_lib $env
(
FPGA_NANOSOC_LIB
)
set output_dir $env
(
FPGA_OUTPUT_DIR
)
set wrapper_name $env
(
FPGA_WRAPPER_NAME
)
set pinmap_file $env
(
FPGA_PINMAP
)
#
# STEP#1: setup design sources and constraints
#
...
...
@@ -31,6 +34,7 @@ set_part $xilinx_part
set_property TARGET_LANGUAGE Verilog
[
current_project
]
set_property DEFAULT_LIB work
[
current_project
]
# TODO: Generalise this stage
set paths
[
list
\
$socket_lib
\
$nanosoc_lib
\
...
...
@@ -51,16 +55,16 @@ report_ip_status
# #
# # using script written out from GUI capture
create_bd_design
nanosoc_
design
create_bd_design
$
design
_name
read_verilog $import_dir/
nanosoc_design_
wrapper.v
source $target_tcl_dir/
nanosoc_
design.tcl
read_verilog $import_dir/
$
wrapper
_name
.v
source $target_tcl_dir/
$
design
_name
.tcl
create_root_design
""
add_files $
import_dir/fpga_pinmap.xdc
add_files $
pinmap_file
set_property top
nanosoc_design_
wrapper
[
current_fileset
]
set_property top
$
wrapper
_name
[
current_fileset
]
# #
# # STEP#3: save in Project mode to complete flow
...
...
This diff is collapsed.
Click to expand it.
fpga/makefile
+
4
−
1
View file @
ea74e1f0
...
...
@@ -49,6 +49,7 @@ NANOSOC_FPGA_FLOW_DIR := $(SOCLABS_NANOSOC_TECH_DIR)/fpga
# Directory to look for FPGA specific implementation files
TARGET_DIR
?=
$(
NANOSOC_FPGA_FLOW_DIR
)
/targets/
$(
BOARD_NAME
)
TARGET_TCL_DIR
:=
$(
TARGET_DIR
)
/vivado_script/
$(
VIVIADO_VERSION
)
PINMAP_FILE
?=
$(
TARGET_DIR
)
/fpga_pinmap.xdc
# NanoSoC Tech Socket Design Dependencies
RTL_SOCKET_DIR
:=
$(
SOCLABS_SOCDEBUG_TECH_DIR
)
/socket/vivado_packages
...
...
@@ -111,15 +112,17 @@ build_nanosoc_design: export FPGA_PROJECT_DIR = $(PROJECT_DIR)
build_nanosoc_design
:
export FPGA_TARGET = $(TARGET_DIR)
build_nanosoc_design
:
export FPGA_TARGET_TCL = $(TARGET_TCL_DIR)
build_nanosoc_design
:
export FPGA_DESIGN_NAME = $(DESIGN_NAME)
build_nanosoc_design
:
export FPGA_WRAPPER_NAME = $(DESIGN_NAME)_wrapper
build_nanosoc_design
:
export FPGA_NANOSOC_LIB = $(IMP_NANOSOC_DIR)
build_nanosoc_design
:
export FPGA_SOCKET_LIB = $(IMP_SOCKET_DIR)
build_nanosoc_design
:
export FPGA_OUTPUT_DIR = $(OUTPUT_DIR)
build_nanosoc_design
:
export FPGA_PINMAP = $(PINMAP_FILE)
# Synthesise and Implement an FPGA Bitfile
build_nanosoc_design
:
@
echo
Building NanoSoC Design
@
mkdir
-p
$(
RUN_DIR
)
@
cd
$(
RUN_DIR
);
vivado
-mode
batch
-source
$(
NANOSOC_FPGA_FLOW_DIR
)
/build_
nanosoc_
design.tcl
@
cd
$(
RUN_DIR
);
vivado
-mode
batch
-source
$(
NANOSOC_FPGA_FLOW_DIR
)
/build_design.tcl
@
cp
$(
RUN_DIR
)
/vivado.log
$(
TARGET_DIR
)
@
echo
Built NanoSoC Design
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment