Skip to content

Commit

Permalink
iceWerx: ledon example added
Browse files Browse the repository at this point in the history
  • Loading branch information
Obijuan committed Apr 28, 2022
1 parent b7ad21e commit 6b0ec63
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 0 deletions.
3 changes: 3 additions & 0 deletions iceWerx/ledon/apio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[env]
board = iceWerx

1 change: 1 addition & 0 deletions iceWerx/ledon/info
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello world for the iceWerx board: Turn on the Red LED
13 changes: 13 additions & 0 deletions iceWerx/ledon/ledon.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//------------------------------------------------------------------
//-- Hello world example for the iceWerx board
//-- Turn on the Red LED
//------------------------------------------------------------------
module leds(output wire LEDR
);

//-- Red LED on
//-- Inverse logic: 0: ON, 1: OFF
assign LEDR = 1'b0;

endmodule

21 changes: 21 additions & 0 deletions iceWerx/ledon/ledon_tb.gtkw
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[*]
[*] GTKWave Analyzer v3.3.103 (w)1999-2019 BSI
[*] Thu Apr 28 17:06:11 2022
[*]
[dumpfile] "/home/obijuan/Develop/FPGAwars/apio-examples/iceWerx/ledon/ledon_tb.vcd"
[dumpfile_mtime] "Thu Apr 28 17:05:43 2022"
[dumpfile_size] 266
[savefile] "/home/obijuan/Develop/FPGAwars/apio-examples/iceWerx/ledon/ledon_tb.gtkw"
[timestart] 0
[size] 1000 600
[pos] -1 -1
*-18.262543 146000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[treeopen] ledon_tb.
[sst_width] 233
[signals_width] 78
[sst_expanded] 1
[sst_vpaned_height] 144
@28
ledon_tb.ledr
[pattern_trace] 1
[pattern_trace] 0
36 changes: 36 additions & 0 deletions iceWerx/ledon/ledon_tb.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//-------------------------------------------------------------------
//-- ledon_tb.v
//-- Testbench
//-------------------------------------------------------------------
//-- Juan Gonzalez (Obijuan)
//-- GPL license
//-------------------------------------------------------------------
`default_nettype none
`define DUMPSTR(x) `"x.vcd`"
`timescale 100 ns / 10 ns

module ledon_tb();

//-- Simulation time: 1us (10 * 100ns)
parameter DURATION = 10;

//-- Red led
wire ledr;

//-- Instantiate the unit to test
leds UUT (
.LEDR(ledr)
);


initial begin

//-- File were to store the simulation results
$dumpfile(`DUMPSTR(`VCD_OUTPUT));
$dumpvars(0, ledon_tb);

#(DURATION) $display("End of simulation");
$finish;
end

endmodule
16 changes: 16 additions & 0 deletions iceWerx/ledon/pinout.pcf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -----------------------------------------------------------------------------
#- iceWerx constraint file (.pcf)
#- By Juan Gonzalez (Obijuan)
#- April - 2022
#- GPL license
# -----------------------------------------------------------------------------


# ------------ User Leds ------------------------------------------------------
#-- Red LED
set_io --warn-no-port LEDR A5 # output

#-- M4

#-- Reloj:
# set_io --warn-no-port clk12MHz P7

0 comments on commit 6b0ec63

Please sign in to comment.