Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a274f65
Added changeBaud functionality to Comm.h and Comm.cxx
gitansh95 Sep 11, 2017
109ffa8
Changed baudRate from uint16_t to uint32_t
gitansh95 Sep 11, 2017
fc02bd7
Added functionality to change Baud rate, updated changelog
gitansh95 Sep 12, 2017
255ba77
added readme
gitansh95 Sep 12, 2017
ba2a1dc
Added test for changeBaud function
gitansh95 Sep 12, 2017
baeaafb
added changeBaudTesting.md python test for changeBaud(), and updated …
gitansh95 Sep 12, 2017
926c955
Added print statements for debugging
gitansh95 Sep 13, 2017
d3a9207
Updated changeBaudTesting.md
gitansh95 Sep 13, 2017
2269b98
commented out all print statements added in prev commit
gitansh95 Sep 13, 2017
21bd989
Uncommented all print lines except Recieved data size : rxsize
gitansh95 Sep 13, 2017
d0288f8
updated results of test
Sep 13, 2017
6fe5ad4
format changes in changeBaudTesting.md
gitansh95 Sep 13, 2017
6a0338b
Added print statements for VS_setVoltage
gitansh95 Sep 13, 2017
4f00089
Commented out print statements, changed VS_setVoltage timeout to 5 se…
Sep 13, 2017
5ff6934
Added print statement for rxsize in Comm.cxx
gitansh95 Sep 13, 2017
c4b820f
Updated testing results
Sep 13, 2017
c5d9a04
Added PRINT_DEBUG statements to Comm.cxx
gitansh95 Sep 13, 2017
80d558c
Merge branch 'master' of https://github.com/gitansh95/XPLORE-software
gitansh95 Sep 13, 2017
0576e1c
Added PRINT_DEBUG test results
Sep 13, 2017
29a6d34
added PRINT_DEBUG to virtuaSMU.cxx
gitansh95 Sep 13, 2017
8ded1c1
Merge branch 'master' of https://github.com/gitansh95/XPLORE-software
gitansh95 Sep 14, 2017
42111cb
Added print statements to libxsmu.cxx
Sep 14, 2017
f6263cd
Found bug - missing line in virtuaSMU.cxx
gitansh95 Sep 14, 2017
4de7312
updated changeBaudTesting.md
Sep 14, 2017
5f721f9
removed PRINT_DEBUG statements
gitansh95 Sep 14, 2017
e948d69
Merge branch 'master' of https://github.com/gitansh95/XPLORE-software
gitansh95 Sep 14, 2017
ce7bd92
removed print statements from libxsmu.cxx
gitansh95 Sep 14, 2017
c3bcf0b
Added function to change FTDI baudrate, implemented keepAlive functio…
gitansh95 Sep 16, 2017
6c4fa01
Added keepAlive missing fn to libxsmu.i, updated changeBaudTesting.md
Sep 16, 2017
217357d
removed isBaudValid from software
gitansh95 Sep 16, 2017
d62ce32
Added a async thread running in the background, and lock object in th…
gitansh95 Sep 18, 2017
2957817
Added virtuaSMU.h
gitansh95 Sep 18, 2017
2bb4116
Added test results for keep alive thread and lock mechanism
Sep 18, 2017
09a1843
Updated Test Results, Implemented possible bug fixes
gitansh95 Sep 18, 2017
499b760
Added REC_SIZE and REC_DATA interface. Incomplete. Do not clone/run t…
gitansh95 Sep 18, 2017
82c7236
Added recSize() and recData() functions
gitansh95 Sep 19, 2017
c48b580
Added testing python interface for recSize, startRec and stopRec func…
gitansh95 Sep 20, 2017
da6a9d3
Added test python files and results for REC_SIZE, START_REC and STOP_REC
gitansh95 Sep 20, 2017
d9333e2
Added python tesing interface, test file, and updated test results fo…
gitansh95 Sep 20, 2017
03bf56c
Converted array to std::vector<int32_t> in CommCB_resData, added appl…
gitansh95 Sep 21, 2017
390b96e
Added test results for recData, added missing declaration in libxsmu.i
gitansh95 Sep 21, 2017
cd66432
Added missing reserve_ in recSize and recData
gitansh95 Sep 21, 2017
b8ddd3a
Modified recData to take size as input from python
gitansh95 Sep 21, 2017
14f957a
Added print debug statements for recData
gitansh95 Sep 21, 2017
9d414d3
Added StartRec and StopRec functions, all the way to firmware
gitansh95 Sep 21, 2017
c8dcf61
Added retest results for START_REC and STOP_REC
gitansh95 Sep 21, 2017
f5976e0
2 Testing results added for REC_DATA
gitansh95 Sep 21, 2017
8c3602b
Added polling function in thread, activeCalibration_ in VM, and pytho…
gitansh95 Sep 21, 2017
db86d21
Merge branch 'master' of https://github.com/gitansh95/XPLORE-software
gitansh95 Sep 22, 2017
5e30733
Minor start/stop rec modifications
gitansh95 Sep 22, 2017
a704126
Modified logic in thread, startRec and stopRec
gitansh95 Sep 22, 2017
f9d4bd6
Working Version, after modifications in firmware to make Acquisition …
gitansh95 Jan 28, 2018
570b92b
Data streaming from ADC, tested at V = 0V
gitansh95 Feb 3, 2018
97337cf
Modified getData python script to write data to log file
gitansh95 Feb 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# ``XPLORE-Software``

### Introduction

**How this project fits into the scheme of things** :
- The ``XPLORE`` system is a sophisticated research grade tool that allows for the measurement of electrical and magnetic transport properties of materials over a wide range of temperature. The system is divided into several modules (Fig.~\ref{fig:xplore_electronics}) described in the following sections, each of which allows the user to explore numerous important properties of their sample.

<!--- Add XPLORE image --->

- Each of XPLORE's modules has separate hardware/software

- Each complete module is made up of the following inter-related layers :
*Hardware* -> *Firmware* -> **Driver -> Application** -> *GUI*

**Functions of Software :**
- The software is C++ code that runs on the computer. The software can be categorized into :
1. Driver : This is C++ code, that communicates with the firmware through an FTDI interface.
2. Application Layer : This contains wrapper functions corresponding to each function in the Driver. `swig` is used to convert these C++ libraries into Python libraries, which further interface with the GUI layer.

**Structure of Software :**
- The software's code resides in the folder `ModuleName/code`. `ModuleName/code` further contains the following directories :

1. `app` : Application code for XPLORE module
2. `stl` : C++ standard template libraries
3. `sys` : Libraries for the hardware interface

`app` is further divided into `app` and `src`, where `app/app` contains all header (`.h`) files and `app/src` contains all `.cxx` files.

- The libraries reside in the folder `ModuleName/wrapper/python`. The C++ libraries are of the form `libModuleName.h' and `libModuleName.cxx`. `libModuleName.i` is an interface file for `swig`. From these files, `swig` generates a corresponding python library for the module, `libModuleName.py`. The instructions to generate the python library are given in the **Installation** section.

**Project Page :**

**Known Issues :** https://github.com/QuazarTech/XPLORE-firmware/issues

### Requirements

- XPLORE Physical Quantites Measurement System (Modules on which you want to modify software)

- Hardware requirements
- Processor : Intel i3 or above
- Storage : Atleast 10 GB
- RAM : Atleast 4 GB

- OS requirements
The XPLORE system has been tested on the following Operating Systems :
- Ubuntu 16.04

- List of Dependencies:
- python 2.7x
- cmake
- swig
- avr-gcc toolchain

Use the following command to get dependencies :
```
sudo apt-get install python cmake swig gcc-avr binutils-avr avr-libc gdb-avr avrdude
```
Found a missing dependency? Open an issue here : https://github.com/QuazarTech/XPLORE-software/issues

### Installation

1. Download the source code for this project using `git clone `
2. Navigate to folder `XPLORE-software/ModuleName/` (eg. `XPLORE-software/XSMU-2.4.0/`)
3. Run `make clean` to remove old dependency (`.dep`) files
4. Run `make wrapper` to generate the python library (`libModuleName.py`) file using swig.
5. Run `make install` to install the code in system directories. You might need to run this as `sudo`.
6. The software libraries for the XPLORE module have now been installed on your system. Each module's libraries will need to be installed separately using the above steps.

### Configuration


### Testing

Tests are provided for each function inside `XPLORE-software/ModuleName/wrapper/python/tests/`. To run the test :
1. Navigate to `XPLORE-software/ModuleName/wrapper/python/tests/`
2. Type `python testName.py` and press Enter.

### Troubleshooting and FAQ


### Maintainers

- Active :
- Krishnendu Chatterjee (kc@quazartech.com)
- Nishant Gupta (nishant@quazartech.com)
- Gitansh Kataria (gitansh@quazartech.com)

- Past
129 changes: 129 additions & 0 deletions XSMU-2.4.0/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,132 @@
####################################################
#
# ^^ Means updated
# ++ Means added
#
####################################################

### 2.4.0

2017-09-12 Gitansh Kataria <gitansh@quazartech.com>

* Feature: A command keepAlive is added to tell the Firmware to keep streaming data.


* Comm.h/Comm/cxx:

^^ COMM_OPCODE
-- COMM_OPCODE_SYNC
++ COMM_OPCODE_KEEP_ALIVE

-- class CommPacket_Synchronize
-- class CommRequest_Synchronize
-- class CommResponse_Synchronize

++ class CommPacket_keepAlive
++ class CommRequest_keepAlive
++ class CommResponse_keepAlive

^^ COMM_CBCODE
-- COMM_CBCODE_SYNC
++ COMM_CBCODE_KEEP_ALIVE

-- class CommCB_Sync
++ class CommCB_keepAlive

^^ union CommCB_Union
-- char gen2 [sizeof (CommCB_Sync)]
++ char gen2 [sizeof (CommCB_keepAlive)]

^^ class Comm : public Applet
-- void SyncCB (void* uint16_t)
++ void keepAlive_CB (void*, uint16_t)

++ void transmit_keepAlive (uint32_t)

* virtuaSMU.h/virtuaSMU.cxx:

++ void keepAlive (uint32_t*, float*)

-- void syncCB (const CommCB* oCB);
++ void keepAliveCB (const CommCB* oCB);

* libxsmu.h/libxsmu.cxx:

++ void keepAlive (int, unsigned int, float,
unsigned int*, float*);

* libxsmu.i:

++ void keepAlive (int, unsigned int, float,
unsigned int*, float*);
++ void keepAlive (int, unsigned int, float,
unsigned int*, float*);

------------------------------------------------------------------------

### 2.4.0

2017-09-12 Gitansh Kataria <gitansh@quazartech.com>

* Feature: Python test file for changeBaud() function

++ changeBaud.py

------------------------------------------------------------------------

### 2.4.0

2017-09-12 Gitansh Kataria <gitansh@quazartech.com>

* Feature: A command to change baud-rate is added.

* FTDI.h/FTDI.cxx:

++ void setBaudRate (uint32_t bd);
++ void _setBaudrate (uint32_t baudrate)

* virtuaSMU.h/virtuaSMU.cxx:

^^ class Driver
++ uint32_t baudRate_
++ void changeBaud (uint32_t*, float*);
++ void changeBaudCB (CommCB*);

* libxsmu.h/libxsmu.cxx:

++ void changeBaud (int, unsigned int, float,
unsigned int*, float*);

* libxsmu.i:

++ void changeBaud (int, unsigned int, float,
unsigned int*, float*);
++ void changeBaud (int, unsigned int, float,
unsigned int*, float*);

* Comm.h/Comm.cxx:

^^ COMM_OPCODE
++ COMM_OPCODE_CHANGE_BAUD

++ class CommPacket_ChangeBaud
++ class CommRequest_ChangeBaud
++ class CommResponse_ChangeBaud

^^ COMM_CBCODE
++ COMM_CBCODE_CHANGE_BAUD

++ class CommCB_ChangeBaud

^^ union CommCB_Union
++ char gen4 [sizeof (CommCB_ChangeBaud)]

^^ class Comm : public Applet
++ void changeBaud_CB (void*, uint16_t)
++ void transmit_changeBaud (uint32_t)

++ void setBaudRate (uint32_t)

------------------------------------------------------------------------
r6 | (no author) | 2013-08-30 12:51:38 +0530 (Fri, 30 Aug 2013) | 4 lines

Expand Down
47 changes: 47 additions & 0 deletions XSMU-2.4.0/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
2.4.0 (Streamer)
================

Nature : Feature
Requested by : Quazar Research

Status : Pending
Created on : 2017-09-09 by KC
Closed on : ---

Description
-----------

The SMU is to stream voltmeter data at a specified frequency. This requires following features to be implemented.

1) Dynamically change baudrate to suit data stream.

-- CHANGE_BAUD

2) Start recording

-- START_REC : Starts recording of timed data into internal buffer.

3) Transfer recorded data chunks to computer

-- Two queues active and standby in firmware.

-- REC_SIZE : Queries number of available data points in buffer

-- Data from ADC keeps getting stored into the Active queue (interrupt driven)
-- Software asks for REC_SIZE, firmware returns size of Standby queue

-- REC_DATA : Transfers requested number of data points to driver

-- Firmware transfers data from Standby queue to software (may be in multiple packets; \
depends on size of stored data and size of comm packet)
-- This transfer is uint32_t (ADC value) and not float. Conversion to float is to be done in software now.
-- This requires the functions XX_setCalibration() to also save the calibration table in software.
-- When no data remaining data in Standby queue (switch Active and Standby queues)

5) Stop recording

-- STOP_REC : Stops recording gracefully.

6)

-- KEEP_ALIVE : Stops recording if keep alive packets are not received, i.e. if driver is dead.
Loading