mirror of
https://github.com/olofk/serv.git
synced 2025-04-20 11:57:07 -04:00
Add support for Nandland Go Board
This commit is contained in:
parent
5e74b13c24
commit
54d5d65b62
5 changed files with 56 additions and 2 deletions
|
@ -183,6 +183,13 @@ Pin 95 is used as the GPIO output which is connected to the board's green LED. D
|
|||
fusesoc run --target=icestick servant
|
||||
iceprog build/servant_1.0.2/icestick-icestorm/servant_1.0.2.bin
|
||||
|
||||
### Nandland Go Board
|
||||
|
||||
Pin 56 is used as the GPIO output which is connected to the board's LED1. Due to this board's limited Embedded BRAM, programs with a maximum of 7168 bytes can be loaded. The default program for this board is blinky.hex.
|
||||
|
||||
fusesoc run --target=go_board servant
|
||||
iceprog build/servant_1.0.2/go_board-icestorm/servant_1.0.2.bin
|
||||
|
||||
## Other targets
|
||||
|
||||
The above targets are run on the servant SoC, but there are some targets defined for the CPU itself. Verilator can be run in lint mode to check for design problems by running
|
||||
|
|
5
data/go_board.pcf
Normal file
5
data/go_board.pcf
Normal file
|
@ -0,0 +1,5 @@
|
|||
# 20 MHz clock input
|
||||
set_io i_clk 15
|
||||
|
||||
# Onboard LED 1
|
||||
set_io q 56
|
17
servant.core
17
servant.core
|
@ -8,6 +8,10 @@ filesets:
|
|||
file_type : verilogSource
|
||||
depend : ["fusesoc:utils:generators"]
|
||||
|
||||
service_no_pll:
|
||||
files: [servant/service_no_pll.v]
|
||||
file_type : verilogSource
|
||||
|
||||
mem_files:
|
||||
files:
|
||||
- sw/blinky.hex : {copyto : blinky.hex}
|
||||
|
@ -80,7 +84,8 @@ filesets:
|
|||
icebreaker : {files: [data/icebreaker.pcf : {file_type : PCF}]}
|
||||
icesugar : {files: [data/icesugar.pcf : {file_type : PCF}]}
|
||||
alhambra : {files: [data/alhambra.pcf : {file_type : PCF}]}
|
||||
icestick : {files: [data/icestick.pcf : {file_type : PCF}]}
|
||||
icestick : {files: [data/icestick.pcf : {file_type : PCF}]}
|
||||
go_board : {files: [data/go_board.pcf : {file_type : PCF}]}
|
||||
|
||||
lx9_microboard:
|
||||
files:
|
||||
|
@ -391,6 +396,16 @@ targets:
|
|||
pnr: next
|
||||
toplevel : service
|
||||
|
||||
go_board:
|
||||
default_tool : icestorm
|
||||
filesets : [mem_files, soc, service_no_pll, go_board]
|
||||
parameters : [memfile=blinky.hex, memsize=7168]
|
||||
tools:
|
||||
icestorm:
|
||||
nextpnr_options : [--hx1k, --package, vq100, --freq, 20]
|
||||
pnr: next
|
||||
toplevel : service
|
||||
|
||||
parameters:
|
||||
PLL:
|
||||
datatype : str
|
||||
|
|
27
servant/service_no_pll.v
Normal file
27
servant/service_no_pll.v
Normal file
|
@ -0,0 +1,27 @@
|
|||
`default_nettype none
|
||||
module service
|
||||
(input wire i_clk,
|
||||
output wire q);
|
||||
|
||||
parameter memfile = "zephyr_hello.hex";
|
||||
parameter memsize = 7168;
|
||||
|
||||
// Pull reset high for 64 clock cycles. Use the 7th bit as the reset signal.
|
||||
reg [6:0] rst_count;
|
||||
wire rst_r = !rst_count[6];
|
||||
|
||||
always @(posedge i_clk) begin
|
||||
if (rst_r == 1) begin
|
||||
rst_count <= rst_count + 1;
|
||||
end
|
||||
end
|
||||
|
||||
servant
|
||||
#(.memfile (memfile),
|
||||
.memsize (memsize))
|
||||
servant
|
||||
(.wb_clk (i_clk),
|
||||
.wb_rst (rst_r),
|
||||
.q (q));
|
||||
|
||||
endmodule
|
|
@ -1,7 +1,7 @@
|
|||
TOOLCHAIN_PREFIX=riscv64-unknown-elf-
|
||||
|
||||
%.elf: %.S link.ld
|
||||
$(TOOLCHAIN_PREFIX)gcc -nostartfiles -march=rv32i -mabi=ilp32 -Tlink.ld -o$@ $<
|
||||
$(TOOLCHAIN_PREFIX)gcc -nostartfiles -nostdlib -march=rv32i -mabi=ilp32 -Tlink.ld -o$@ $<
|
||||
%.bin: %.elf
|
||||
$(TOOLCHAIN_PREFIX)objcopy -O binary $< $@
|
||||
%.hex: %.bin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue