enjoy-digital / litescope

Small footprint and configurable embedded FPGA logic analyzer
Other
167 stars 40 forks source link

Missing csr.csv does not trigger an explicit error in LiteScopeAnalyzerDriver #15

Open Acathla-fr opened 4 years ago

Acathla-fr commented 4 years ago

Error reported when instantiating LiteScopeAnalyzerDriver(wb.regs, "build_dir/analyzer", debug=True) :

File "litex/litescope/litescope/software/driver/analyzer.py", line 33, in __init__
    self.trigger_enable.write(0)
AttributeError: 'LiteScopeAnalyzerDriver' object has no attribute 'trigger_enable'

Solved by adding config_csv=build_dir/csr.csv to the options.

Line of code where the check probably should be done: https://github.com/enjoy-digital/litescope/blob/daf10e9473fb70b3034e0331ef89005661ac04e0/litescope/software/driver/analyzer.py#L37

Acathla-fr commented 4 years ago

Wrong analysis. csr.csv has nothing to do here. The right line should be :

analyzer = LiteScopeAnalyzerDriver(wb.regs, "analyzer", config_csv="build_dir/analyzer.csv", debug=True)

The second parameter, name, should not include a path.