Giter VIP home page Giter VIP logo

pixiesdk's People

Contributors

eagleirony avatar kiwichris avatar xia-ann avatar xia-ethan avatar xia-stan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pixiesdk's Issues

SYNCH_WAIT cause "module task timeout"

Hardware:
crate: type UEP 6021
module:
slot2: 500M 14bits revF, firmware version 43351, CSRB = 65
slot3: 100M 14bits revF, firmware version 40391, CSRB = 0
slot4: 250M 14bits revF, firmware version 44496, CSRB = 0

Description:
I tried to run the example example_pixie16api at the git commit 27ba537 but failed. I use command ./example_pixie16api list-mode -t 1 --synch-wait=1 --num-runs=1 --config config.json to run in list mode for 1 seconds with the modules start/stop synchronously. But I got the error "Pixie16EndRun failed with code -214 and message: module task timeout". But it works with option --synch-wait=0.
And these modules also work in the old version legacy api. So I tried to compare the difference between them.
In the legacy code, line 1299 of file pixie16app.c gives (void) Pixie_Register_IO(modulenumber, PCI_STOPRUN_RGADDR, MOD_WRITE, &dummy);. It seems that it write an uninitialized variable dummy to the virtual memory at address 0x44. But I didn't find anything like this in the new version code.
And in the new version code, I found the example in my case always failed at the check in line 164 in function "void end(module::module &module)" in file run.cpp. The condition check is (!hw::run::active(module) || run_ended(module)) and modules failed to pass it. For the active check, although the RUNENA(1) bit was clear, the RUNACTIVE(13) bit didn't clear. And I'm not sure whether there may be some problem in the second run_ended check. This check at first require run task to be histogram or list mode (at line 117,118); but run task was set to run_stopping at line 156 before the check. So I think no module could pass this check. And then it require the module is not the leader module. I think it means that in my case, module in slot 3 and 4 with CSRB==0 could pass the check, but actually they didn't because the run task invalid.
Then I tried to add something like Pixie_Register_IO(0,0x44,MOD_WRITE,&dummy) from legacy code to new version code. I tried to add module->write_word(0x44, 0); at line 817 in pixie/pixie16/pixie16.cpp and comment line 156 module.run_task = ruN_task::run_stopping in file run.cpp. As expected, it doesn't work. But it clears the RUNACTIVE(13) bit of module 0. So I add module->write_word(0x44,0) at line 813 in pixie/pixie16/pixie16.cpp and change line 435 in example_pixie16api.cpp from cfg.module[0].number to cfg.num_modules(). Then it works and I got successful output like "INFO - Pixie16ExitSystem finished successfully.". But I didn't check the acquiring data yet.
I hope to know why making synch-wait=1 cause error. Maybe because I didn't set the parameters properly? And is it reasonable to write something to address 0x44? Whether this operation keep the modules start and stop synchronously? If not, how to make it right?

Does not find module in the crate

Running my code with a prior version of the Pixie SDK, and the code works. It connects to the hardware, reads data from the hardware, and all of that.

Running with 3.0.0, I get the following output in the logfile:

[INFO ] 2021-08-30T11:06:02.934877 begin log
[INFO ] 2021-08-30T11:06:02.948905 Pixie16InitSystem: NumModules=1 PXISlotMap=0x55dcf8c439a0 OfflineMode=0
[INFO ] 2021-08-30T11:06:02.948950 crate: initialise
[INFO ] 2021-08-30T11:06:02.949157 module: PLX: driver: version=8.2.3
[INFO ] 2021-08-30T11:06:02.949191 module: PLX: device: type=9054 rev=172
[INFO ] 2021-08-30T11:06:02.949274 module: PLX: pci: device-number=0 domain=0 bus=6 slot=15
[ERROR] 2021-08-30T11:06:02.949372 error(except): pcf8574::read_a_byte: no ACK after DevSel
[ERROR] 2021-08-30T11:06:02.963314 module: device 0: error: pcf8574::read_a_byte: no ACK after DevSel
[INFO ] 2021-08-30T11:06:02.963408 module offline: device 0
[ERROR] 2021-08-30T11:06:02.963600 error(except): module: num=-1,slot=0: PCI find: device: 1: PLX (517) PLX_STATUS_INVALID_OBJECT
[ERROR] 2021-08-30T11:06:02.963661 module: device 1: error: module: num=-1,slot=0: PCI find: device: 1: PLX (517) PLX_STATUS_INVALID_OBJECT
[ERROR] 2021-08-30T11:06:02.963711 error(except): Crate did not initialize with any modules.
[ERROR] 2021-08-30T11:06:02.963764 result=201, Crate did not initialize with any modules.

For some reason, it seems that the SDK is simply not seeing the module. Yet the module is physically there, and is found by a previous version of the SDK.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.