-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
889 additions
and
712 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ chs-clean-deps: | |
###################### | ||
|
||
CHS_NONFREE_REMOTE ?= [email protected]:pulp-restricted/cheshire-nonfree.git | ||
CHS_NONFREE_COMMIT ?= e702b4ce754c3b7c9a864a2ce8e2d2fa013056ea | ||
CHS_NONFREE_COMMIT ?= 65f089e9218084e872009cf1c557965914cacf05 | ||
|
||
chs-nonfree-init: | ||
git clone $(CHS_NONFREE_REMOTE) $(CHS_ROOT)/nonfree | ||
|
@@ -158,3 +158,4 @@ chs-sim-all: $(CHS_ROOT)/target/sim/vsim/compile.cheshire_soc.tcl | |
############# | ||
|
||
include $(CHS_ROOT)/target/xilinx/xilinx.mk | ||
include $(CHS_XIL_DIR)/sim/simulate.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Copyright 2020 ETH Zurich and University of Bologna. | ||
# Solderpad Hardware License, Version 0.51, see LICENSE for details. | ||
# SPDX-License-Identifier: SHL-0.51 | ||
# | ||
# Nils Wistoff <[email protected]> | ||
# Noah Huetter <[email protected]> | ||
# | ||
|
||
set mcs_file flash_img.mcs | ||
set file $::env(FILE) | ||
set offset $::env(OFFSET) | ||
|
||
# Create flash configuration file | ||
write_cfgmem -force -format mcs -size 256 -interface SPIx4 \ | ||
-loaddata "up $offset $file" \ | ||
-checksum \ | ||
-file $mcs_file | ||
|
||
# Open and connect HW manager | ||
open_hw_manager | ||
connect_hw_server -url $::env(HOST):$::env(PORT) -allow_non_jtag | ||
current_hw_target [get_hw_targets $::env(HOST):$::env(PORT)/$::env(FPGA_PATH)] | ||
set_property PARAM.FREQUENCY 15000000 [get_hw_targets $::env(HOST):$::env(PORT)/$::env(FPGA_PATH)] | ||
open_hw_target | ||
current_hw_device [get_hw_devices xcvu37p_0] | ||
|
||
# Add the SPI flash as configuration memory | ||
set hw_device [get_hw_devices xcvu37p_0] | ||
create_hw_cfgmem -hw_device $hw_device [lindex [get_cfgmem_parts {mt25qu02g-spi-x1_x2_x4}] 0] | ||
set hw_cfgmem [get_property PROGRAM.HW_CFGMEM $hw_device] | ||
set_property PROGRAM.ADDRESS_RANGE {use_file} $hw_cfgmem | ||
set_property PROGRAM.FILES [list $mcs_file ] $hw_cfgmem | ||
set_property PROGRAM.PRM_FILE {} $hw_cfgmem | ||
set_property PROGRAM.UNUSED_PIN_TERMINATION {pull-none} $hw_cfgmem | ||
set_property PROGRAM.BLANK_CHECK 0 $hw_cfgmem | ||
set_property PROGRAM.ERASE 0 $hw_cfgmem | ||
set_property PROGRAM.CFG_PROGRAM 1 $hw_cfgmem | ||
set_property PROGRAM.VERIFY 0 $hw_cfgmem | ||
set_property PROGRAM.CHECKSUM 0 $hw_cfgmem | ||
|
||
# Create bitstream to access SPI flash | ||
create_hw_bitstream -hw_device $hw_device [get_property PROGRAM.HW_CFGMEM_BITFILE $hw_device]; | ||
program_hw_devices $hw_device; | ||
refresh_hw_device $hw_device; | ||
|
||
# Program SPI flash | ||
program_hw_cfgmem -hw_cfgmem $hw_cfgmem | ||
|
||
# Close connection | ||
close_hw_manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.