puleblaster only backend
This commit is contained in:
parent
912c3e0aaa
commit
0aaa1496dc
@ -27,7 +27,8 @@ MACHINES = \
|
|||||||
Mobilecore$(EXEEXT) \
|
Mobilecore$(EXEEXT) \
|
||||||
Mobile_wo_sync_backend$(EXEEXT) \
|
Mobile_wo_sync_backend$(EXEEXT) \
|
||||||
berta \
|
berta \
|
||||||
general
|
general \
|
||||||
|
pulseblaster_only
|
||||||
|
|
||||||
DRV_SPC_MI40xx = ../drivers/Spectrum-MI40xxSeries/Spectrum-MI40xxSeries.a
|
DRV_SPC_MI40xx = ../drivers/Spectrum-MI40xxSeries/Spectrum-MI40xxSeries.a
|
||||||
DRV_SPC_M2i40xx = ../drivers/Spectrum-M2i40xxSeries/Spectrum-M2i40xxSeries.a
|
DRV_SPC_M2i40xx = ../drivers/Spectrum-M2i40xxSeries/Spectrum-M2i40xxSeries.a
|
||||||
@ -326,3 +327,19 @@ pb_radio_processor_g_backend: pb_radio_processor_g_backend.o \
|
|||||||
|
|
||||||
pb_radio_processor_g_backend.o: pb_radio_processor_g_backend.cpp \
|
pb_radio_processor_g_backend.o: pb_radio_processor_g_backend.cpp \
|
||||||
pb_radio_processor_g_backend.h
|
pb_radio_processor_g_backend.h
|
||||||
|
|
||||||
|
|
||||||
|
pulseblaster_only$(EXEEXT): pulseblaster_only.o \
|
||||||
|
hardware.o \
|
||||||
|
../drivers/dummy/dummy.o \
|
||||||
|
$(DRV_SPC_MI40xx) \
|
||||||
|
$(DRV_PTS) \
|
||||||
|
$(DRV_TEMPCONT) \
|
||||||
|
$(DRV_PB_24BIT) $(DRV_PB) $(DRV_PB_PROG) \
|
||||||
|
../core/core.a
|
||||||
|
@$(LINK_MACHINE) $^ $(LIBS) -o $@ -lpthread
|
||||||
|
|
||||||
|
|
||||||
|
pulseblaster_only.o: pulseblaster_only.cpp \
|
||||||
|
../drivers/SpinCore-PulseBlaster24Bit/SpinCore-PulseBlaster24Bit.h ../drivers/SpinCore-PulseBlaster/SpinCore-PulseBlaster.h ../drivers/SpinCore-PulseBlaster/PulseBlasterProgram.h \
|
||||||
|
../core/stopwatch.h ../drivers/Spectrum-MI40xxSeries/Spectrum-MI40xxSeries.h ../drivers/Spectrum-M2i40xxSeries/Spectrum-M2i40xxSeries.h
|
||||||
|
109
machines/pulseblaster_only.cpp
Normal file
109
machines/pulseblaster_only.cpp
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
/* **************************************************************************
|
||||||
|
|
||||||
|
Author: Markus Rosenstihl
|
||||||
|
Created: June 2016
|
||||||
|
|
||||||
|
****************************************************************************/
|
||||||
|
#include "machines/hardware.h"
|
||||||
|
#include "core/core.h"
|
||||||
|
#include "drivers/PTS-Synthesizer/PTS.h"
|
||||||
|
#include "drivers/dummy/dummy.h"
|
||||||
|
#include "drivers/SpinCore-PulseBlaster24Bit/SpinCore-PulseBlaster24Bit.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
\defgroup mobilemachine Mobile NMR Spectrometer
|
||||||
|
\ingroup machines
|
||||||
|
Uses Spincore Pulseblaster 24 Bit and Dummy ADC PTS310 with cable driver with phase control and no synchronization board
|
||||||
|
\li line 0 for gate
|
||||||
|
\li line 1 for pulse
|
||||||
|
\li llne 17 for trigger
|
||||||
|
\li line 16 free (not using synchronization board)
|
||||||
|
|
||||||
|
\par Starting the hardware
|
||||||
|
This procedure should assure the correct initialisation of the hardware:
|
||||||
|
\li Switch off main switches of SpinCore Pulseblaster and Computer (the main switch of the computer is at the rear)
|
||||||
|
\li Switch on Computer and start Windows or linux
|
||||||
|
|
||||||
|
@{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
class pulseblaster_only_hardware: public hardware
|
||||||
|
{
|
||||||
|
|
||||||
|
PTS* my_pts;
|
||||||
|
SpinCorePulseBlaster24Bit* my_pulseblaster;
|
||||||
|
dummy* my_adc;
|
||||||
|
|
||||||
|
public:
|
||||||
|
pulseblaster_only_hardware()
|
||||||
|
{
|
||||||
|
ttlout trigger;
|
||||||
|
trigger.id = 0;
|
||||||
|
/* trigger on line 17 */
|
||||||
|
trigger.ttls = 1 << 17;
|
||||||
|
my_adc = new dummy;
|
||||||
|
/* device_id=0, clock=100MHz, sync_mask: Bit 16 */
|
||||||
|
my_pulseblaster = new SpinCorePulseBlaster24Bit(0, 1e8, 0 << 16);
|
||||||
|
my_pts = new PTS_latched(0);
|
||||||
|
|
||||||
|
// publish devices
|
||||||
|
the_pg = my_pulseblaster;
|
||||||
|
the_adc = my_adc;
|
||||||
|
the_fg = my_pts;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual ~pulseblaster_only_hardware()
|
||||||
|
{
|
||||||
|
if (the_adc != NULL)
|
||||||
|
delete the_adc;
|
||||||
|
if (the_fg != NULL)
|
||||||
|
delete the_fg;
|
||||||
|
if (the_pg != NULL)
|
||||||
|
delete the_pg;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief brings standard core together with the Mobile NMR hardware
|
||||||
|
*/
|
||||||
|
class pulseblaster_core: public core
|
||||||
|
{
|
||||||
|
std::string the_name;
|
||||||
|
public:
|
||||||
|
pulseblaster_core(const core_config& conf) :
|
||||||
|
core(conf)
|
||||||
|
{
|
||||||
|
the_hardware = new pulseblaster_only_hardware();
|
||||||
|
the_name = "Mobile backend without synchronisation card";
|
||||||
|
}
|
||||||
|
virtual const std::string& core_name() const
|
||||||
|
{
|
||||||
|
return the_name;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
@}
|
||||||
|
*/
|
||||||
|
|
||||||
|
int main(int argc, const char** argv)
|
||||||
|
{
|
||||||
|
int return_result = 0;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
core_config my_conf(argv, argc);
|
||||||
|
// setup input and output
|
||||||
|
pulseblaster_core my_core(my_conf);
|
||||||
|
// start core application
|
||||||
|
my_core.run();
|
||||||
|
}
|
||||||
|
catch (const DamarisException& e)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "%s\n", e.what());
|
||||||
|
return_result = 1;
|
||||||
|
}
|
||||||
|
return return_result;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user