-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Xilinx Virtex-7 FPGA VC709 board #835
Conversation
new file: src/main/resources/vc709/uartboot/Makefile new file: src/main/resources/vc709/uartboot/Makefile-back new file: src/main/resources/vc709/uartboot/common.h new file: src/main/resources/vc709/uartboot/crc16.c new file: src/main/resources/vc709/uartboot/crc16.o new file: src/main/resources/vc709/uartboot/gpoi.c new file: src/main/resources/vc709/uartboot/head.S new file: src/main/resources/vc709/uartboot/hello.c new file: src/main/resources/vc709/uartboot/include/bits.h new file: src/main/resources/vc709/uartboot/include/const.h new file: src/main/resources/vc709/uartboot/include/crc16.h new file: src/main/resources/vc709/uartboot/include/devices/clint.h new file: src/main/resources/vc709/uartboot/include/devices/gpio.h new file: src/main/resources/vc709/uartboot/include/devices/plic.h new file: src/main/resources/vc709/uartboot/include/devices/spi.h new file: src/main/resources/vc709/uartboot/include/devices/uart.h new file: src/main/resources/vc709/uartboot/include/kprintf.h new file: src/main/resources/vc709/uartboot/include/platform.h new file: src/main/resources/vc709/uartboot/include/riscv_test_defaults.h new file: src/main/resources/vc709/uartboot/include/sections.h new file: src/main/resources/vc709/uartboot/include/serial.h new file: src/main/resources/vc709/uartboot/include/smp.h new file: src/main/resources/vc709/uartboot/kprintf.c new file: src/main/resources/vc709/uartboot/linker/bootrom.elf.lds new file: src/main/resources/vc709/uartboot/linker/memory.lds new file: src/main/resources/vc709/uartboot/plic.c new file: src/main/resources/vc709/uartboot/sd.c new file: src/main/resources/vc709/uartboot/serial.c new file: src/main/resources/vc709/uartboot/uart.c new file: src/main/resources/vc709/uartsend/Makefile new file: src/main/resources/vc709/uartsend/serial new file: src/main/resources/vc709/uartsend/serial.c new file: src/main/resources/vc709/uartsend/serial.o new file: src/main/scala/vc709/Configs.scala new file: src/main/scala/vc709/CustomOverlays.scala new file: src/main/scala/vc709/TestHarness.scala modified: Makefile
modified: fpga/src/main/scala/vc709/Configs.scala modified: fpga/src/main/scala/vc709/TestHarness.scala modified: fpga/fpga-shells (new commits, modified content) modified: generators/rocket-chip (new commits)
modified: src/main/resources/vc709/uartboot/head.S modified: src/main/resources/vc709/uartboot/linker/bootrom.elf.lds modified: src/main/resources/vc709/uartboot/linker/memory.lds modified: src/main/scala/vc709/Configs.scala modified: src/main/scala/vc709/CustomOverlays.scala modified: src/main/scala/vc709/TestHarness.scala
modified: src/main/scala/vc709/Configs.scala modified: src/main/scala/vc709/CustomOverlays.scala new file: src/main/scala/vc709/HarnessBinders.scala modified: src/main/scala/vc709/TestHarness.scala modified: Makefile deleted: src/main/resources/vc709/uartboot/crc16.o modified: src/main/resources/vc709/uartboot/head.S modified: src/main/resources/vc709/uartboot/linker/bootrom.elf.lds modified: src/main/resources/vc709/uartboot/linker/memory.lds
######################################################################################### | ||
# general cleanup rules | ||
######################################################################################### | ||
.PHONY: clean | ||
clean: | ||
rm -rf $(gen_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Chipyard we have this clean
target "clean" everything (hence the gen_dir
being deleted). I wouldn't be opposed to adding a new target like clean-specific
(or a better name) that just deletes the sources related to this config.
So I would revert this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with your suggestion that It would be better to have a new target like clean-specific
for a certain config!
@@ -71,6 +85,7 @@ default: $(mcs) | |||
# misc. directories | |||
######################################################################################### | |||
fpga_dir := $(base_dir)/fpga/fpga-shells/$(FPGA_BRAND) | |||
fpga_board_script_dir := $(fpga_dir)/$(BOARD)/tcl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is originally used in sifive/freedom. I do not remember the original intention. It can be removed since we no longer need it currently.
@@ -120,9 +135,19 @@ debug-bitstream: $(build_dir)/obj/post_synth.dcp | |||
$(build_dir)/debug_obj \ | |||
$(fpga_common_script_dir) | |||
|
|||
MCS_FILE := $(build_dir)/obj/$(MODEL).mcs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the MCS file used for? I removed this when originally setting up this work to keep things clean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since every time we power off the board, the uploaded bit-stream will be lost. When working around the kernel after building up the prototype, we would not want to upload the bit-stream too often. Having a mcs file is better choice. It will save our time in the post stage of testing the prototype!
@@ -0,0 +1,9 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mis-spelled filename gpoi
-> gpio
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a mistake to be corrected.
@@ -0,0 +1,50 @@ | |||
# Guide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 points here. 1st. We are currently trying to get FireMarshal to target the prototype platforms so a lot involving building Linux won't be necessary (stay tuned for that). 2nd. At a minimum, this should be put in markdown and put in the Chipyard docs in the prototyping section. Once that is done we can talk more about how to make this a bit more understandable for folks.
First of all, thanks for the contribution! I gave a quick 1st pass on the PR. May you change the target to the As mentioned in this post: #784 (comment)... we are still trying to figure out some testing infrastructure since it's hard to test this stuff when we don't have the boards to run regressions. I'll let you know what the status is on that since that is a bit slow right now. |
WithTLBackingMemory is moved to the front of WithSystemModifications so that the size of ExtMem is updated and in effect.
update MEMORY_MEM_SIZE
Tested with sifive/fpga-shells#160
Related issue:
Type of change: new feature
Impact: new fpga target
Release Notes
Add support for Xilinx Virtex-7 FPGA VC709 board.
Currently, the Linux kernel (version 5.11.0-rc3) can boot with the help of Open-SBI (version v0.9), and login with UART/Serial port on the Xilinx Virtex-7 FPGA VC709 board!