update makefile to represent new functional sim locations
This commit is contained in:
parent
3c06b74c7a
commit
1710da6f87
26
Makefile
26
Makefile
|
|
@ -29,20 +29,28 @@ auto_gen:
|
|||
python3 test/auto_gen/run_tests.py
|
||||
|
||||
# Functional Simulation
|
||||
functional_sim: io_core_tb logic_analyzer_tb bit_fifo_tb bridge_rx_tb bridge_tx_tb lut_ram_tb uart_tb uart_tx_tb
|
||||
functional_sim: io_core_tb logic_analyzer_tb bit_fifo_tb bridge_rx_tb bridge_tx_tb lut_ram_tb
|
||||
|
||||
io_core_tb:
|
||||
iverilog -g2012 -o sim.out -y src/manta test/functional_sim/io_core_tb.sv
|
||||
iverilog -g2012 -o sim.out -y src/manta \
|
||||
test/functional_sim/io_core_tb/io_core_tb.sv \
|
||||
test/functional_sim/io_core_tb/io_core.v
|
||||
vvp sim.out
|
||||
rm sim.out
|
||||
|
||||
logic_analyzer_tb:
|
||||
iverilog -g2012 -o sim.out -y src/manta test/functional_sim/logic_analyzer_tb.sv
|
||||
iverilog -g2012 -o sim.out -y src/manta \
|
||||
test/functional_sim/logic_analyzer_tb/logic_analyzer_tb.sv \
|
||||
test/functional_sim/logic_analyzer_tb/logic_analyzer.v \
|
||||
test/functional_sim/logic_analyzer_tb/sample_mem.v \
|
||||
test/functional_sim/logic_analyzer_tb/trigger_block.v
|
||||
vvp sim.out
|
||||
rm sim.out
|
||||
|
||||
bit_fifo_tb:
|
||||
iverilog -g2012 -o sim.out -y src/manta test/functional_sim/bit_fifo_tb.sv
|
||||
iverilog -g2012 -o sim.out -y src/manta \
|
||||
test/functional_sim/bit_fifo_tb/bit_fifo_tb.sv \
|
||||
test/functional_sim/bit_fifo_tb/bit_fifo.v
|
||||
vvp sim.out
|
||||
rm sim.out
|
||||
|
||||
|
|
@ -61,16 +69,6 @@ lut_ram_tb:
|
|||
vvp sim.out
|
||||
rm sim.out
|
||||
|
||||
uart_tb:
|
||||
iverilog -g2012 -o sim.out -y src/manta test/functional_sim/uart_tb.sv
|
||||
vvp sim.out
|
||||
rm sim.out
|
||||
|
||||
uart_tx_tb:
|
||||
iverilog -g2012 -o sim.out -y src/manta test/functional_sim/uart_tx_tb.sv
|
||||
vvp sim.out
|
||||
rm sim.out
|
||||
|
||||
# Build Examples
|
||||
|
||||
examples: icestick nexys_a7
|
||||
|
|
|
|||
|
|
@ -1,21 +1,46 @@
|
|||
from manta import Manta
|
||||
from scapy.all import *
|
||||
|
||||
src_mac = "00:e0:4c:68:06:aa"
|
||||
dst_mac = "69:69:5a:06:54:91"
|
||||
ifc = "en8"
|
||||
m = Manta('manta.yaml')
|
||||
print(m.my_io_core.led.base_addr)
|
||||
|
||||
############
|
||||
|
||||
echosvc_etype = 0x1234
|
||||
def set_led(val):
|
||||
src_mac = "00:e0:4c:68:06:aa"
|
||||
dst_mac = "69:69:5a:06:54:91"
|
||||
ifc = "en8"
|
||||
|
||||
mypkt = Ether()
|
||||
mypkt.src = src_mac
|
||||
mypkt.dst = dst_mac
|
||||
mypkt.type = 0x1234
|
||||
mypkt = Ether()
|
||||
mypkt.src = src_mac
|
||||
mypkt.dst = dst_mac
|
||||
mypkt.type = 0x1234
|
||||
|
||||
msg = b'\x00\x06\x00\x06'
|
||||
msg = b'\x00\x06' + val.to_bytes(2, 'big')
|
||||
|
||||
mypkt = mypkt / msg
|
||||
for i in range(200):
|
||||
mypkt = mypkt / msg
|
||||
mypkt.load = msg
|
||||
sendp(mypkt, iface=ifc)
|
||||
sendpfast(mypkt, iface=ifc)
|
||||
|
||||
|
||||
|
||||
from time import sleep
|
||||
led_val = 1
|
||||
direction = True
|
||||
while True:
|
||||
if direction:
|
||||
if led_val == 2**15:
|
||||
direction = False
|
||||
|
||||
else:
|
||||
led_val = led_val * 2
|
||||
set_led(led_val)
|
||||
|
||||
else:
|
||||
if led_val == 1:
|
||||
direction = True
|
||||
|
||||
else:
|
||||
led_val = led_val // 2
|
||||
set_led(led_val)
|
||||
|
||||
sleep(0.01)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ module io_core_tb;
|
|||
logic la_tb_valid;
|
||||
|
||||
|
||||
io_core #(.BASE_ADDR(0), .SAMPLE_DEPTH(128)) io(
|
||||
io_core #(.BASE_ADDR(0)) io(
|
||||
.clk(clk),
|
||||
|
||||
// inputs
|
||||
|
|
|
|||
Loading…
Reference in New Issue