Upload 4x4 keyboard test model

master
Ivan Olenichev 6 years ago
parent 90fc7379fd
commit 8e8c2598c1

Binary file not shown.

@ -0,0 +1,3 @@
[env]
board = icestick

@ -0,0 +1,20 @@
set_io LEDS[0] 99 #RED
set_io LEDS[1] 98 #RED
set_io LEDS[2] 97 #RED
set_io LEDS[3] 96 #RED
set_io TACT_LED 95 #GREEN
set_io COLS[0] 78 #J2-1 or PIO1-02
set_io COLS[1] 79 #J2-2 or PIO1-03
set_io COLS[2] 80 #J2-3 or PIO1-04
set_io COLS[3] 81 #J2-4 or PIO1-05
set_io ROWS[0] 119 #J1-10 or PIO0-09
set_io ROWS[1] 118 #J1-9 or PIO0-08
set_io ROWS[2] 117 #J1-8 or PIO0-07
set_io ROWS[3] 116 #J1-7 or PIO0-06
set_io CLK 21
#set_io SCL 90 # J2, 9
#set_io SDA 91 # J2, 10
# GND - J2, 11

File diff suppressed because it is too large Load Diff

Binary file not shown.

@ -0,0 +1,254 @@
# Generated by Yosys 0.7 (Apio build) (git sha1 8c071a2, gcc 4.8.4-2ubuntu1~14.04.3 -fPIC -Os)
.model top
.inputs CLK COLS[0] COLS[1] COLS[2] COLS[3] ROWS[0] ROWS[1] ROWS[2] ROWS[3]
.outputs ROWS[0] ROWS[1] ROWS[2] ROWS[3] LEDS[0] LEDS[1] LEDS[2] LEDS[3] TACT_LED
.names $false
.names $true
1
.names $undef
.gate SB_LUT4 I0=$abc$541$n37_1 I1=$abc$541$n42 I2=$abc$541$n43 I3=$false O=$abc$541$n1
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:47"
.param LUT_INIT 10000000
.gate SB_LUT4 I0=$abc$541$n38 I1=$abc$541$n39 I2=$abc$541$n40 I3=$abc$541$n41 O=$abc$541$n37_1
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:51"
.param LUT_INIT 1000000000000000
.gate SB_LUT4 I0=period_counter[19] I1=period_counter[22] I2=period_counter[18] I3=period_counter[20] O=$abc$541$n38
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:51"
.param LUT_INIT 0001000000000000
.gate SB_LUT4 I0=period_counter[10] I1=period_counter[13] I2=period_counter[14] I3=period_counter[15] O=$abc$541$n39
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:51"
.param LUT_INIT 0000000000000001
.gate SB_LUT4 I0=period_counter[11] I1=period_counter[12] I2=period_counter[16] I3=period_counter[17] O=$abc$541$n40
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:51"
.param LUT_INIT 1000000000000000
.gate SB_LUT4 I0=period_counter[21] I1=period_counter[23] I2=period_counter[8] I3=period_counter[9] O=$abc$541$n41
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:51"
.param LUT_INIT 1000000000000000
.gate SB_LUT4 I0=period_counter[4] I1=period_counter[5] I2=period_counter[6] I3=period_counter[7] O=$abc$541$n42
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:51"
.param LUT_INIT 0000000000000001
.gate SB_LUT4 I0=period_counter[0] I1=period_counter[1] I2=period_counter[2] I3=period_counter[3] O=$abc$541$n43
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:51"
.param LUT_INIT 0000000000000001
.gate SB_LUT4 I0=$abc$541$n43 I1=$abc$541$n37_1 I2=$abc$541$n42 I3=period_counter[0] O=$abc$541$n51
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:51"
.param LUT_INIT 1111111110000000
.gate SB_LUT4 I0=row_counter[1] I1=TACT_LED I2=$false I3=$false O=$0\row_counter[1:0][1]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:43"
.param LUT_INIT 0110
.gate SB_LUT4 I0=row_counter[1] I1=$false I2=$false I3=$false O=$abc$541$n3
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:39"
.param LUT_INIT 01
.gate SB_LUT4 I0=period_counter[1] I1=$false I2=$false I3=$false O=$abc$541$n52
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:39"
.param LUT_INIT 01
.gate SB_LUT4 I0=TACT_LED I1=$false I2=$false I3=$false O=$abc$541$n54
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:39"
.param LUT_INIT 01
.gate SB_LUT4 I0=$abc$541$n37_1 I1=$abc$541$n42 I2=$abc$541$n43 I3=$false O=$abc$541$n50
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:47"
.param LUT_INIT 10000000
.gate SB_LUT4 I0=TACT_LED I1=$false I2=$false I3=$false O=$0\row_counter[1:0][0]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:39"
.param LUT_INIT 01
.gate SB_LUT4 I0=$false I1=$true I2=period_counter[0] I3=$false O=$add$top.v:27$5_Y[0]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[10] I3=$auto$alumacc.cc:470:replace_alu$27.C[10] O=$add$top.v:27$5_Y[10]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[10] CO=$auto$alumacc.cc:470:replace_alu$27.C[11] I0=$false I1=period_counter[10]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[11] I3=$auto$alumacc.cc:470:replace_alu$27.C[11] O=$add$top.v:27$5_Y[11]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[11] CO=$auto$alumacc.cc:470:replace_alu$27.C[12] I0=$false I1=period_counter[11]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[12] I3=$auto$alumacc.cc:470:replace_alu$27.C[12] O=$add$top.v:27$5_Y[12]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[12] CO=$auto$alumacc.cc:470:replace_alu$27.C[13] I0=$false I1=period_counter[12]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[13] I3=$auto$alumacc.cc:470:replace_alu$27.C[13] O=$add$top.v:27$5_Y[13]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[13] CO=$auto$alumacc.cc:470:replace_alu$27.C[14] I0=$false I1=period_counter[13]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[14] I3=$auto$alumacc.cc:470:replace_alu$27.C[14] O=$add$top.v:27$5_Y[14]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[14] CO=$auto$alumacc.cc:470:replace_alu$27.C[15] I0=$false I1=period_counter[14]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[15] I3=$auto$alumacc.cc:470:replace_alu$27.C[15] O=$add$top.v:27$5_Y[15]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[15] CO=$auto$alumacc.cc:470:replace_alu$27.C[16] I0=$false I1=period_counter[15]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[16] I3=$auto$alumacc.cc:470:replace_alu$27.C[16] O=$add$top.v:27$5_Y[16]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[16] CO=$auto$alumacc.cc:470:replace_alu$27.C[17] I0=$false I1=period_counter[16]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[17] I3=$auto$alumacc.cc:470:replace_alu$27.C[17] O=$add$top.v:27$5_Y[17]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[17] CO=$auto$alumacc.cc:470:replace_alu$27.C[18] I0=$false I1=period_counter[17]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[18] I3=$auto$alumacc.cc:470:replace_alu$27.C[18] O=$add$top.v:27$5_Y[18]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[18] CO=$auto$alumacc.cc:470:replace_alu$27.C[19] I0=$false I1=period_counter[18]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[19] I3=$auto$alumacc.cc:470:replace_alu$27.C[19] O=$add$top.v:27$5_Y[19]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[19] CO=$auto$alumacc.cc:470:replace_alu$27.C[20] I0=$false I1=period_counter[19]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_CARRY CI=period_counter[0] CO=$auto$alumacc.cc:470:replace_alu$27.C[2] I0=$false I1=period_counter[1]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[20] I3=$auto$alumacc.cc:470:replace_alu$27.C[20] O=$add$top.v:27$5_Y[20]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[20] CO=$auto$alumacc.cc:470:replace_alu$27.C[21] I0=$false I1=period_counter[20]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[21] I3=$auto$alumacc.cc:470:replace_alu$27.C[21] O=$add$top.v:27$5_Y[21]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[21] CO=$auto$alumacc.cc:470:replace_alu$27.C[22] I0=$false I1=period_counter[21]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[22] I3=$auto$alumacc.cc:470:replace_alu$27.C[22] O=$add$top.v:27$5_Y[22]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[22] CO=$auto$alumacc.cc:470:replace_alu$27.C[23] I0=$false I1=period_counter[22]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[23] I3=$auto$alumacc.cc:470:replace_alu$27.C[23] O=$add$top.v:27$5_Y[23]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[2] I3=$auto$alumacc.cc:470:replace_alu$27.C[2] O=$add$top.v:27$5_Y[2]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[2] CO=$auto$alumacc.cc:470:replace_alu$27.C[3] I0=$false I1=period_counter[2]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[3] I3=$auto$alumacc.cc:470:replace_alu$27.C[3] O=$add$top.v:27$5_Y[3]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[3] CO=$auto$alumacc.cc:470:replace_alu$27.C[4] I0=$false I1=period_counter[3]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[4] I3=$auto$alumacc.cc:470:replace_alu$27.C[4] O=$add$top.v:27$5_Y[4]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[4] CO=$auto$alumacc.cc:470:replace_alu$27.C[5] I0=$false I1=period_counter[4]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[5] I3=$auto$alumacc.cc:470:replace_alu$27.C[5] O=$add$top.v:27$5_Y[5]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[5] CO=$auto$alumacc.cc:470:replace_alu$27.C[6] I0=$false I1=period_counter[5]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[6] I3=$auto$alumacc.cc:470:replace_alu$27.C[6] O=$add$top.v:27$5_Y[6]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[6] CO=$auto$alumacc.cc:470:replace_alu$27.C[7] I0=$false I1=period_counter[6]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[7] I3=$auto$alumacc.cc:470:replace_alu$27.C[7] O=$add$top.v:27$5_Y[7]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[7] CO=$auto$alumacc.cc:470:replace_alu$27.C[8] I0=$false I1=period_counter[7]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[8] I3=$auto$alumacc.cc:470:replace_alu$27.C[8] O=$add$top.v:27$5_Y[8]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[8] CO=$auto$alumacc.cc:470:replace_alu$27.C[9] I0=$false I1=period_counter[8]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_LUT4 I0=$false I1=$false I2=period_counter[9] I3=$auto$alumacc.cc:470:replace_alu$27.C[9] O=$add$top.v:27$5_Y[9]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:53"
.param LUT_INIT 0110100110010110
.gate SB_CARRY CI=$auto$alumacc.cc:470:replace_alu$27.C[9] CO=$auto$alumacc.cc:470:replace_alu$27.C[10] I0=$false I1=period_counter[9]
.attr src "/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/arith_map.v:47"
.gate SB_DFFE C=CLK D=$0\row_counter[1:0][0] E=$abc$541$n50 Q=TACT_LED
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:8"
.gate SB_DFFE C=CLK D=$0\row_counter[1:0][1] E=$abc$541$n50 Q=row_counter[1]
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:8"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[0] Q=period_counter[0] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFESR C=CLK D=$abc$541$n52 E=$abc$541$n51 Q=period_counter[1] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:8"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[2] Q=period_counter[2] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[3] Q=period_counter[3] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[4] Q=period_counter[4] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[5] Q=period_counter[5] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[6] Q=period_counter[6] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[7] Q=period_counter[7] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[8] Q=period_counter[8] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[9] Q=period_counter[9] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[10] Q=period_counter[10] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[11] Q=period_counter[11] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[12] Q=period_counter[12] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[13] Q=period_counter[13] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[14] Q=period_counter[14] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[15] Q=period_counter[15] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[16] Q=period_counter[16] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[17] Q=period_counter[17] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[18] Q=period_counter[18] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[19] Q=period_counter[19] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[20] Q=period_counter[20] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[21] Q=period_counter[21] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[22] Q=period_counter[22] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFSR C=CLK D=$add$top.v:27$5_Y[23] Q=period_counter[23] R=$abc$541$n1
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:2"
.gate SB_DFFESR C=CLK D=$abc$541$n54 E=$abc$541$n50 Q=rows_en[0] R=row_counter[1]
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:8"
.gate SB_DFFESR C=CLK D=TACT_LED E=$abc$541$n50 Q=rows_en[1] R=row_counter[1]
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:8"
.gate SB_DFFESR C=CLK D=$abc$541$n54 E=$abc$541$n50 Q=rows_en[2] R=$abc$541$n3
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:8"
.gate SB_DFFESR C=CLK D=TACT_LED E=$abc$541$n50 Q=rows_en[3] R=$abc$541$n3
.attr src "top.v:20|/home/t-bird/.apio/packages/toolchain-icestorm/bin/../share/yosys/ice40/cells_map.v:8"
.gate SB_IO D_IN_0=rows_in[0] D_OUT_0=$false OUTPUT_ENABLE=rows_en[0] PACKAGE_PIN=ROWS[0]
.attr src "top.v:33"
.param PIN_TYPE 101001
.param PULLUP 0
.gate SB_IO D_IN_0=rows_in[1] D_OUT_0=$false OUTPUT_ENABLE=rows_en[1] PACKAGE_PIN=ROWS[1]
.attr src "top.v:33"
.param PIN_TYPE 101001
.param PULLUP 0
.gate SB_IO D_IN_0=rows_in[2] D_OUT_0=$false OUTPUT_ENABLE=rows_en[2] PACKAGE_PIN=ROWS[2]
.attr src "top.v:33"
.param PIN_TYPE 101001
.param PULLUP 0
.gate SB_IO D_IN_0=rows_in[3] D_OUT_0=$false OUTPUT_ENABLE=rows_en[3] PACKAGE_PIN=ROWS[3]
.attr src "top.v:33"
.param PIN_TYPE 101001
.param PULLUP 0
.names COLS[0] LEDS[0]
1 1
.names COLS[1] LEDS[1]
1 1
.names COLS[2] LEDS[2]
1 1
.names COLS[3] LEDS[3]
1 1
.names TACT_LED row_counter[0]
1 1
.end

@ -0,0 +1,43 @@
module top (input CLK, input [3:0] COLS, inout [3:0] ROWS, output [3:0] LEDS, output TACT_LED);
// MODULE POOLS MATRIX KEYBOARD 4x4 WITH PERIOD ~1 SEC (FOR EACH ROW)
// AND REDIRECTED COLUMNS TO RED LEDS
// GREEN LED TOGGLES EVERY ONE SECOND (AS POOLING PERIOD)
// NEED FOR CHECKING CONNECTION TO MATRIX 4x4 KEYBOARD
// IF THERE IS NO KEY PRESSED, ALL RED LEDS ARE ON
// IF SOME KEY PRESSED, SOME LED IS NOT ON IN ONE OF FOUR PERIODS
// ETC
reg [1:0] row_counter = 0;
reg [23:0] period_counter = 0;
reg [3:0] rows_out = 0;
reg [3:0] rows_en = 0;
wire [3:0] rows_in;
parameter period = 24'd12000000;
always @ ( posedge CLK ) begin
if (period_counter == period) begin
period_counter <= 0;
rows_en <= (1<<row_counter);
row_counter <= row_counter + 1;
end
else
period_counter <= period_counter + 1;
end
assign TACT_LED = row_counter[0];
assign LEDS = COLS;
SB_IO #(
.PIN_TYPE(6'b 1010_01),
.PULLUP(1'b 0)
) rows_io [3:0] (
.PACKAGE_PIN(ROWS),
.OUTPUT_ENABLE(rows_en),
.D_OUT_0(rows_out),
.D_IN_0(rows_in)
);
endmodule
Loading…
Cancel
Save