]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
Timestamp in RO
authorhadeshyp <hadeshyp>
Mon, 8 Oct 2012 14:04:57 +0000 (14:04 +0000)
committerhadeshyp <hadeshyp>
Mon, 8 Oct 2012 14:04:57 +0000 (14:04 +0000)
cts/CtsPlugins/CtsMod60.pm [new file with mode: 0644]

diff --git a/cts/CtsPlugins/CtsMod60.pm b/cts/CtsPlugins/CtsMod60.pm
new file mode 100644 (file)
index 0000000..1a259b2
--- /dev/null
@@ -0,0 +1,44 @@
+# Module: CBM Module
+# 
+
+package CtsMod60;
+
+@ISA = (CtsBaseModule);
+
+use warnings;
+use strict;
+
+sub moduleName {"CBM"}
+
+sub init {
+   my $self    = $_[0];
+   my $address = $_[1];
+   
+   my $trb  = $self->{'_cts'}{'_trb'};
+   
+   my $regs = $self->{'_registers'};
+   my $expo = $self->{'_exportRegs'};
+   my $prop = $self->{'_properties'};
+
+   my $header = $self->{'_cts'}{'_enum'}{0x60}->read();
+   
+   $regs->{'trg_cbm_status'} = new TrbRegister($address + 1, $trb, {
+         'value' => {'lower' =>  0, 'len' => 32, 'type' => 'hex'},
+      }, {
+         'accessmode' => "ro",
+         'label' => "CBM Status Register",
+         'monitor' => '1'
+      });
+
+   $regs->{'trg_cbm_control'} = new TrbRegister($address + 2, $trb, {},
+      {
+         'accessmode' => "rw",
+         'label' => "CBM Control Register",
+         'monitor' => '1',
+         'export' => 1
+      });
+
+   $self->{'_cts'}->getProperties->{'itc_assignments'}[$header->{'itc_base'}] = "Ext. Logic - CBM";
+}
+
+1;
\ No newline at end of file