mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
litescope: move files and modify import to misoclib.tools.litescope
This commit is contained in:
parent
b274e948dc
commit
c4ebf244a1
71 changed files with 46 additions and 49 deletions
|
@ -9,10 +9,10 @@ from migen.bank.description import *
|
|||
|
||||
from targets import *
|
||||
|
||||
from litescope.common import *
|
||||
from litescope.bridge.uart2wb import LiteScopeUART2WB
|
||||
from litescope.frontend.la import LiteScopeLA
|
||||
from litescope.core.port import LiteScopeTerm
|
||||
from misoclib.tools.litescope.common import *
|
||||
from misoclib.tools.litescope.bridge.uart2wb import LiteScopeUART2WB
|
||||
from misoclib.tools.litescope.frontend.la import LiteScopeLA
|
||||
from misoclib.tools.litescope.core.port import LiteScopeTerm
|
||||
|
||||
from misoclib.com.liteeth.common import *
|
||||
from misoclib.com.liteeth.generic import *
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from litescope.common import *
|
||||
from litescope.frontend.la import LiteScopeLA
|
||||
from litescope.core.port import LiteScopeTerm
|
||||
from misoclib.tools.litescope.common import *
|
||||
from misoclib.tools.litescope.frontend.la import LiteScopeLA
|
||||
from misoclib.tools.litescope.core.port import LiteScopeTerm
|
||||
|
||||
from misoclib.com.liteeth.common import *
|
||||
from misoclib.com.liteeth.generic import *
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from litescope.common import *
|
||||
from litescope.frontend.la import LiteScopeLA
|
||||
from litescope.core.port import LiteScopeTerm
|
||||
from misoclib.tools.litescope.common import *
|
||||
from misoclib.tools.litescope.frontend.la import LiteScopeLA
|
||||
from misoclib.tools.litescope.core.port import LiteScopeTerm
|
||||
|
||||
from misoclib.com.liteeth.common import *
|
||||
from misoclib.com.liteeth.generic import *
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from litescope.common import *
|
||||
from litescope.frontend.la import LiteScopeLA
|
||||
from litescope.core.port import LiteScopeTerm
|
||||
from misoclib.tools.litescope.common import *
|
||||
from misoclib.tools.litescope.frontend.la import LiteScopeLA
|
||||
from misoclib.tools.litescope.core.port import LiteScopeTerm
|
||||
|
||||
from misoclib.com.liteeth.common import *
|
||||
from misoclib.com.liteeth.generic import *
|
||||
|
|
|
@ -17,10 +17,10 @@ def _get_args():
|
|||
if __name__ == "__main__":
|
||||
args = _get_args()
|
||||
if args.bridge == "uart":
|
||||
from litescope.host.driver.uart import LiteScopeUARTDriver
|
||||
from misoclib.tools.litescope.host.driver.uart import LiteScopeUARTDriver
|
||||
wb = LiteScopeUARTDriver(args.port, args.baudrate, "./csr.csv", int(args.busword), debug=False)
|
||||
elif args.bridge == "etherbone":
|
||||
from litescope.host.driver.etherbone import LiteScopeEtherboneDriver
|
||||
from misoclib.tools.litescope.host.driver.etherbone import LiteScopeEtherboneDriver
|
||||
wb = LiteScopeEtherboneDriver(args.ip_address, int(args.udp_port), "./csr.csv", int(args.busword), debug=False)
|
||||
else:
|
||||
ValueError("Invalid bridge {}".format(args.bridge))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import time
|
||||
from litescope.host.driver.la import LiteScopeLADriver
|
||||
from misoclib.tools.litescope.host.driver.la import LiteScopeLADriver
|
||||
|
||||
def main(wb):
|
||||
la = LiteScopeLADriver(wb.regs, "la", debug=True)
|
||||
|
|
3
misoclib/tools/.gitignore
vendored
3
misoclib/tools/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
__pycache__
|
||||
*.pyc
|
||||
*.vcd
|
0
misoclib/tools/__init__.py
Normal file
0
misoclib/tools/__init__.py
Normal file
|
@ -1,4 +1,4 @@
|
|||
from litescope.common import *
|
||||
from misoclib.tools.litescope.common import *
|
||||
from migen.bus import wishbone
|
||||
from migen.genlib.misc import chooser
|
||||
from migen.genlib.cdc import MultiReg
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from litescope.common import *
|
||||
from misoclib.tools.litescope.common import *
|
||||
|
||||
class LiteScopeTermUnit(Module):
|
||||
def __init__(self, dw):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from litescope.common import *
|
||||
from misoclib.tools.litescope.common import *
|
||||
from migen.flow.plumbing import Buffer
|
||||
|
||||
class LiteScopeSubSamplerUnit(Module):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from litescope.common import *
|
||||
from misoclib.tools.litescope.common import *
|
||||
|
||||
class LiteScopeSumUnit(Module, AutoCSR):
|
||||
def __init__(self, ports):
|
||||
|
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
|
@ -1,4 +1,4 @@
|
|||
from litescope.common import *
|
||||
from misoclib.tools.litescope.common import *
|
||||
|
||||
class LiteScopeIO(Module, AutoCSR):
|
||||
def __init__(self, dw):
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from litescope.common import *
|
||||
from litescope.core.trigger import LiteScopeTrigger
|
||||
from litescope.core.storage import LiteScopeSubSampler, LiteScopeRecorder, LiteScopeRunLengthEncoder
|
||||
from misoclib.tools.litescope.common import *
|
||||
from misoclib.tools.litescope.core.trigger import LiteScopeTrigger
|
||||
from misoclib.tools.litescope.core.storage import LiteScopeSubSampler, LiteScopeRecorder, LiteScopeRunLengthEncoder
|
||||
|
||||
from mibuild.tools import write_to_file
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import socket
|
||||
from litescope.host.driver.reg import *
|
||||
from misoclib.tools.litescope.host.driver.reg import *
|
||||
|
||||
from liteeth.test.model.etherbone import *
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import csv
|
||||
from struct import *
|
||||
from migen.fhdl.structure import *
|
||||
from litescope.host.dump import *
|
||||
from litescope.host.driver.truthtable import *
|
||||
from misoclib.tools.litescope.host.dump import *
|
||||
from misoclib.tools.litescope.host.driver.truthtable import *
|
||||
|
||||
class LiteScopeLADriver():
|
||||
def __init__(self, regs, name, config_csv=None, clk_freq=None, debug=False):
|
||||
|
@ -124,16 +124,16 @@ class LiteScopeLADriver():
|
|||
print("saving to " + filename)
|
||||
name, ext = os.path.splitext(filename)
|
||||
if ext == ".vcd":
|
||||
from litescope.host.dump.vcd import VCDDump
|
||||
from misoclib.tools.litescope.host.dump.vcd import VCDDump
|
||||
dump = VCDDump()
|
||||
elif ext == ".csv":
|
||||
from litescope.host.dump.csv import CSVDump
|
||||
from misoclib.tools.litescope.host.dump.csv import CSVDump
|
||||
dump = CSVDump()
|
||||
elif ext == ".py":
|
||||
from litescope.host.dump.python import PythonDump
|
||||
from misoclib.tools.litescope.host.dump.python import PythonDump
|
||||
dump = PythonDump()
|
||||
elif ext == ".sr":
|
||||
from litescope.host.dump.sigrok import SigrokDump
|
||||
from misoclib.tools.litescope.host.dump.sigrok import SigrokDump
|
||||
if self.samplerate is None:
|
||||
raise ValueError("Unable to automatically retrieve clk_freq, clk_freq parameter required")
|
||||
dump = SigrokDump(samplerate=self.samplerate)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import serial
|
||||
from struct import *
|
||||
from litescope.host.driver.reg import *
|
||||
from misoclib.tools.litescope.host.driver.reg import *
|
||||
|
||||
def write_b(uart, data):
|
||||
uart.write(pack('B',data))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from litescope.host.dump import *
|
||||
from misoclib.tools.litescope.host.dump import *
|
||||
|
||||
class CSVDump(Dump):
|
||||
def __init__(self, init_dump=None):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from litescope.host.dump import *
|
||||
from misoclib.tools.litescope.host.dump import *
|
||||
|
||||
class PythonDump(Dump):
|
||||
def __init__(self, init_dump=None):
|
||||
|
|
|
@ -5,7 +5,7 @@ import zipfile
|
|||
import re
|
||||
from collections import OrderedDict
|
||||
|
||||
from litescope.host.dump import *
|
||||
from misoclib.tools.litescope.host.dump import *
|
||||
|
||||
class SigrokDump(Dump):
|
||||
def __init__(self, init_dump=None, samplerate=50000000):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import datetime
|
||||
from litescope.host.dump import *
|
||||
from misoclib.tools.litescope.host.dump import *
|
||||
|
||||
class VCDDump(Dump):
|
||||
def __init__(self, init_dump=None, timescale="1ps", comment=""):
|
||||
|
|
|
@ -10,7 +10,7 @@ from migen.bank.description import CSRStatus
|
|||
from mibuild import tools
|
||||
from mibuild.xilinx_common import *
|
||||
|
||||
from litescope.common import *
|
||||
from misoclib.tools.litescope.common import *
|
||||
|
||||
def get_csr_csv(regions):
|
||||
r = ""
|
|
@ -7,11 +7,11 @@ from migen.bank.description import *
|
|||
|
||||
from targets import *
|
||||
|
||||
from litescope.common import *
|
||||
from litescope.bridge.uart2wb import LiteScopeUART2WB
|
||||
from litescope.frontend.io import LiteScopeIO
|
||||
from litescope.frontend.la import LiteScopeLA
|
||||
from litescope.core.port import LiteScopeTerm
|
||||
from misoclib.tools.litescope.common import *
|
||||
from misoclib.tools.litescope.bridge.uart2wb import LiteScopeUART2WB
|
||||
from misoclib.tools.litescope.frontend.io import LiteScopeIO
|
||||
from misoclib.tools.litescope.frontend.la import LiteScopeLA
|
||||
from misoclib.tools.litescope.core.port import LiteScopeTerm
|
||||
|
||||
class _CRG(Module):
|
||||
def __init__(self, clk_in):
|
|
@ -17,10 +17,10 @@ def _get_args():
|
|||
if __name__ == "__main__":
|
||||
args = _get_args()
|
||||
if args.bridge == "uart":
|
||||
from litescope.host.driver.uart import LiteScopeUARTDriver
|
||||
from misoclib.tools.litescope.host.driver.uart import LiteScopeUARTDriver
|
||||
wb = LiteScopeUARTDriver(args.port, args.baudrate, "./csr.csv", int(args.busword), debug=False)
|
||||
elif args.bridge == "etherbone":
|
||||
from litescope.host.driver.etherbone import LiteScopeEtherboneDriver
|
||||
from misoclib.tools.litescope.host.driver.etherbone import LiteScopeEtherboneDriver
|
||||
wb = LiteScopeEtherboneDriver(args.ip_address, int(args.udp_port), "./csr.csv", int(args.busword), debug=False)
|
||||
else:
|
||||
ValueError("Invalid bridge {}".format(args.bridge))
|
|
@ -1,5 +1,5 @@
|
|||
import time
|
||||
from litescope.host.driver.io import LiteScopeIODriver
|
||||
from misoclib.tools.litescope.host.driver.io import LiteScopeIODriver
|
||||
|
||||
def led_anim0(io):
|
||||
for i in range(10):
|
|
@ -1,4 +1,4 @@
|
|||
from litescope.host.driver.la import LiteScopeLADriver
|
||||
from misoclib.tools.litescope.host.driver.la import LiteScopeLADriver
|
||||
|
||||
def main(wb):
|
||||
wb.open()
|
Loading…
Reference in a new issue