mirror of
https://github.com/corundum/corundum.git
synced 2025-01-16 08:12:53 +08:00
Cleanup
This commit is contained in:
parent
495178e1dc
commit
ffd04d2bb0
@ -745,22 +745,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
@ -865,22 +865,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
@ -865,22 +865,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
@ -681,22 +681,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
@ -796,22 +796,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
@ -617,22 +617,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
@ -678,22 +678,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
@ -649,24 +649,6 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield from rc.mem_write_dword(dev_pf0_bar0+0x270, 0);
|
||||
yield from rc.mem_write_dword(dev_pf0_bar0+0x274, 0);
|
||||
yield from rc.mem_write_dword(dev_pf0_bar0+0x278, 0);
|
||||
yield from rc.mem_write_dword(dev_pf0_bar0+0x27C, 0);
|
||||
|
||||
yield from rc.mem_write_dword(dev_pf0_bar0+0x290, 0);
|
||||
yield from rc.mem_write_dword(dev_pf0_bar0+0x294, 1000);
|
||||
yield from rc.mem_write_dword(dev_pf0_bar0+0x298, 0);
|
||||
yield from rc.mem_write_dword(dev_pf0_bar0+0x29C, 0);
|
||||
|
||||
yield from rc.mem_write_dword(dev_pf0_bar0+0x280, 0);
|
||||
yield from rc.mem_write_dword(dev_pf0_bar0+0x284, 2000);
|
||||
yield from rc.mem_write_dword(dev_pf0_bar0+0x288, 0);
|
||||
yield from rc.mem_write_dword(dev_pf0_bar0+0x28C, 0);
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
@ -683,6 +665,24 @@ def bench():
|
||||
|
||||
yield from rc.mem_read(driver.hw_addr, 4) # wait for all writes to complete
|
||||
|
||||
# configure PTP period out
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x270, 0) # start fns
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x274, 0) # start ns
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x278, 0) # start sec (low)
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x27C, 0) # start sec (high)
|
||||
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x290, 0) # width fns
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x294, 1000) # width ns
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x298, 0) # width sec (low)
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x29C, 0) # width sec (high)
|
||||
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x280, 0) # period fns
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x284, 2000) # period ns
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x288, 0) # period sec (low)
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x28C, 0) # period sec (high)
|
||||
|
||||
yield from rc.mem_write_dword(driver.hw_addr+0x260, 1) # enable output
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
|
@ -656,9 +656,6 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
|
@ -719,9 +719,6 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
|
@ -728,22 +728,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate()
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
@ -847,22 +847,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
@ -716,22 +716,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
@ -832,22 +832,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
@ -866,22 +866,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
@ -650,9 +650,6 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
|
@ -720,9 +720,6 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
|
@ -848,22 +848,12 @@ def bench():
|
||||
|
||||
yield rc.enumerate(enable_bus_mastering=True, configure_msi=True)
|
||||
|
||||
dev_pf0_bar0 = dev.functions[0].bar[0] & 0xfffffffc
|
||||
dev_pf0_bar1 = dev.functions[0].bar[1] & 0xfffffffc
|
||||
|
||||
yield delay(100)
|
||||
|
||||
yield clk.posedge
|
||||
print("test 2: init NIC")
|
||||
current_test.next = 2
|
||||
|
||||
#data = yield from rc.mem_read(dev_pf0_bar0+0x20000+0x10, 4);
|
||||
#print(data)
|
||||
|
||||
#yield delay(1000)
|
||||
|
||||
#raise StopSimulation
|
||||
|
||||
yield from driver.init_dev(dev.functions[0].get_id())
|
||||
yield from driver.interfaces[0].open()
|
||||
#yield from driver.interfaces[1].open()
|
||||
|
Loading…
x
Reference in New Issue
Block a user