From 0375ba896f801d2fc267f8d904a7ee0380a8fff4 Mon Sep 17 00:00:00 2001 From: Dave Dribin Date: Sun, 27 Jun 2021 23:10:49 -0500 Subject: [PATCH] Move to board-specific top-level and file set --- data/go_board.pcf | 7 +++++-- servant.core | 15 +++++++-------- servant/{service_no_pll.v => service_go_board.v} | 15 +++++++++------ 3 files changed, 21 insertions(+), 16 deletions(-) rename servant/{service_no_pll.v => service_go_board.v} (54%) diff --git a/data/go_board.pcf b/data/go_board.pcf index bf9ecd9..8f94c26 100644 --- a/data/go_board.pcf +++ b/data/go_board.pcf @@ -1,5 +1,8 @@ # 20 MHz clock input set_io i_clk 15 -# Onboard LED 1 -set_io q 56 +# Onboard LED 1-4 +set_io o_led1 56 +set_io o_led2 57 +set_io o_led3 59 +set_io o_led4 60 \ No newline at end of file diff --git a/servant.core b/servant.core index eb0b8fd..eb05cda 100644 --- a/servant.core +++ b/servant.core @@ -8,10 +8,6 @@ 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} @@ -85,7 +81,11 @@ filesets: icesugar : {files: [data/icesugar.pcf : {file_type : PCF}]} alhambra : {files: [data/alhambra.pcf : {file_type : PCF}]} icestick : {files: [data/icestick.pcf : {file_type : PCF}]} - go_board : {files: [data/go_board.pcf : {file_type : PCF}]} + + go_board: + files: + - data/go_board.pcf : {file_type : PCF} + - servant/service_go_board.v : {file_type : verilogSource} lx9_microboard: files: @@ -398,13 +398,12 @@ targets: go_board: default_tool : icestorm - filesets : [mem_files, soc, service_no_pll, go_board] - parameters : [memfile=blinky.hex, memsize=7168] + filesets : [mem_files, soc, go_board] tools: icestorm: nextpnr_options : [--hx1k, --package, vq100, --freq, 20] pnr: next - toplevel : service + toplevel : service_go_board parameters: PLL: diff --git a/servant/service_no_pll.v b/servant/service_go_board.v similarity index 54% rename from servant/service_no_pll.v rename to servant/service_go_board.v index d5f3a6f..d7effa3 100644 --- a/servant/service_no_pll.v +++ b/servant/service_go_board.v @@ -1,12 +1,15 @@ `default_nettype none -module service +module service_go_board (input wire i_clk, - output wire q); + output wire o_led1, + output wire o_led2 = 1'b0, + output wire o_led3 = 1'b0, + output wire o_led4 = 1'b0); - parameter memfile = "zephyr_hello.hex"; - parameter memsize = 7168; + parameter memfile = "blinky.hex"; + parameter memsize = 512; - // Pull reset high for 64 clock cycles. Use the 7th bit as the reset signal. + // Assert reset for 64 clock cycles. Use the 7th bit as the reset signal. reg [6:0] rst_count; wire rst_r = !rst_count[6]; @@ -22,6 +25,6 @@ module service servant (.wb_clk (i_clk), .wb_rst (rst_r), - .q (q)); + .q (o_led1)); endmodule