--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>DAC Control</title>
+ <link rel="stylesheet" type="text/css" href="setreg.css">
+
+ <script type="text/javascript">
+ function send(reg) {
+ if (reg == "IBIAS") regn = 0x40;
+ if (reg == "ITHR") regn = 0x41;
+ if (reg == "IDB") regn = 0x42;
+ if (reg == "VRESET") regn = 0x43;
+ if (reg == "VPL") regn = 0x44;
+ if (reg == "VPH") regn = 0x45;
+ if (reg == "VPH_FINE") regn = 0x46;
+ if (reg == "VCASP") regn = 0x47;
+ if (reg == "VCASA") regn = 0x48;
+ if (reg == "VCASB") regn = 0x49;
+ if (reg == "VCASC") regn = 0x4a;
+ if (reg == "VCASD") regn = 0x4b;
+ if (reg == "VCASN") regn = 0x4c;
+ if (reg == "VCLIP") regn = 0x4d;
+ if (reg == "IBUFBIAS") regn = 0x4e;
+
+ value = document.getElementById(reg).value;
+
+ var url = "setreg.pl?";
+ url += document.getElementById("fpga").value;
+ url += "-" + regn;
+ url += "-" + value;
+
+ document.getElementById(reg+"txt").innerHTML = value;
+
+ getData(url);
+ }
+
+ function getData(command,dId,callback) {
+
+ var xmlhttp = null;
+ var cb = null;
+ xmlhttp=new XMLHttpRequest();
+ cb = callback;
+ var destId = dId;
+ var cmd = command;
+
+ xmlhttp.onreadystatechange = function() {
+ if(xmlhttp.readyState == 4) {
+ if(destId && document.getElementById(destId)){
+ document.getElementById(destId).innerHTML = xmlhttp.responseText;
+ }
+ if(cb) {
+ cb(xmlhttp.responseText);
+ }
+ }
+ }
+
+ xmlhttp.open("GET",command,1);
+ xmlhttp.send(null);
+ }
+
+ </script>
+ </head>
+ <body>
+ <h1>DAC Control</h1>
+ <div class="dac_container">
+ FPGA <input class="dac_input" type="text" id="fpga" onChange="loadvalues()">
+ <!-- <a id="DownloadLink" href="getdacfile.pl" download="CONF_dac.pl" target="_blank">Download</a> -->
+ <a id="DownloadLink" href="getdacfile.pl" download="CONF_dac.pl" target="_blank">Download</a>
+ <input class="dac_input" type="text" id="filename" onChange="setfilename()" value="CONF_dac.pl">
+ <div class="slider_container"> <div class="slider_name">VCASP</div> <input class="dac_input" id="VCASP" type="range" min="0" max="255" step="1.0" value="67" onChange="send('VCASP')"><div class="slider_value" id="VCASPtxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">VCASNA</div> <input class="dac_input" id="VCASA" type="range" min="0" max="255" step="1.0" value="100" onChange="send('VCASA')"><div class="slider_value" id="VCASAtxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">VCASNB</div> <input class="dac_input" id="VCASB" type="range" min="0" max="255" step="1.0" value="100" onChange="send('VCASB')"><div class="slider_value" id="VCASBtxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">VCASNC</div> <input class="dac_input" id="VCASC" type="range" min="0" max="255" step="1.0" value="100" onChange="send('VCASC')"><div class="slider_value" id="VCASCtxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">VCASND</div> <input class="dac_input" id="VCASD" type="range" min="0" max="255" step="1.0" value="100" onChange="send('VCASD')"><div class="slider_value" id="VCASDtxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">VCASN2</div> <input class="dac_input" id="VCASN" type="range" min="0" max="255" step="1.0" value="166" onChange="send('VCASN')"><div class="slider_value" id="VCASNtxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">IDB</div> <input class="dac_input" id="IDB" type="range" min="0" max="255" step="1.0" value="166" onChange="send('IDB')"><div class="slider_value" id="IDBtxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">IBIAS</div> <input class="dac_input" id="IBIAS" type="range" min="0" max="255" step="1.0" value="166" onChange="send('IBIAS')"><div class="slider_value" id="IBIAStxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">ITHR</div> <input class="dac_input" id="ITHR" type="range" min="0" max="255" step="1.0" value="166" onChange="send('ITHR')"><div class="slider_value" id="ITHRtxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">IBUFBIAS</div> <input class="dac_input" id="IBUFBIAS" type="range" min="0" max="255" step="1.0" value="166" onChange="send('IBUFBIAS')"><div class="slider_value" id="IBUFBIAStxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">VPL</div> <input class="dac_input" id="VPL" type="range" min="0" max="255" step="1.0" value="166" onChange="send('VPL')"><div class="slider_value" id="VPLtxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">VPH</div> <input class="dac_input" id="VPH" type="range" min="0" max="255" step="1.0" value="166" onChange="send('VPH')"><div class="slider_value" id="VPHtxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">VPH_FINE</div> <input class="dac_input" id="VPH_FINE" type="range" min="0" max="255" step="1.0" value="166" onChange="send('VPH_FINE')"><div class="slider_value" id="VPH_FINEtxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">VRESET</div> <input class="dac_input" id="VRESET" type="range" min="0" max="255" step="1.0" value="166" onChange="send('VRESET')"><div class="slider_value" id="VRESETtxt"></div></div>
+ <div class="slider_container"> <div class="slider_name">VCLIP</div> <input class="dac_input" id="VCLIP" type="range" min="0" max="255" step="1.0" value="166" onChange="send('VCLIP')"><div class="slider_value" id="VCLIPtxt"></div></div>
+ <br>
+ </div>
+ </body>
+
+ <script type="text/javascript">
+ loadvalues();
+
+ function loadvalues() {
+ // document.getElementById("DownloadLink").href="getdacfile.pl?"+document.getElementById("fpga").value;
+ getData("getdac.pl?"+document.getElementById("fpga").value,"",showDacs);
+ }
+
+ function setfilename() {
+ document.getElementById("DownloadLink").download=document.getElementById("filename").value;
+ }
+
+ function showDacs(s) {
+ vals = s.split("-");
+ document.getElementById("IBIAStxt").innerHTML = vals[0];
+ document.getElementById("ITHRtxt").innerHTML = vals[1];
+ document.getElementById("IDBtxt").innerHTML = vals[2];
+ document.getElementById("VRESETtxt").innerHTML = vals[3];
+ document.getElementById("VPLtxt").innerHTML = vals[4];
+ document.getElementById("VPHtxt").innerHTML = vals[5];
+ document.getElementById("VPH_FINEtxt").innerHTML = vals[6];
+ document.getElementById("VCASPtxt").innerHTML = vals[7];
+ document.getElementById("VCASAtxt").innerHTML = vals[8];
+ document.getElementById("VCASBtxt").innerHTML = vals[9];
+ document.getElementById("VCASCtxt").innerHTML = vals[10];
+ document.getElementById("VCASDtxt").innerHTML = vals[11];
+ document.getElementById("VCASNtxt").innerHTML = vals[12];
+ document.getElementById("VCLIPtxt").innerHTML = vals[13];
+ document.getElementById("IBUFBIAStxt").innerHTML = vals[14];
+
+ document.getElementById("IBIAS").value = vals[0];
+ document.getElementById("ITHR").value = vals[1];
+ document.getElementById("IDB").value = vals[2];
+ document.getElementById("VRESET").value = vals[3];
+ document.getElementById("VPL").value = vals[4];
+ document.getElementById("VPH").value = vals[5];
+ document.getElementById("VPH_FINE").value = vals[6];
+ document.getElementById("VCASP").value = vals[7];
+ document.getElementById("VCASA").value = vals[8];
+ document.getElementById("VCASB").value = vals[9];
+ document.getElementById("VCASC").value = vals[10];
+ document.getElementById("VCASD").value = vals[11];
+ document.getElementById("VCASN").value = vals[12];
+ document.getElementById("VCLIP").value = vals[13];
+ document.getElementById("IBUFBIAS").value = vals[14];
+ }
+ </script>
+</html>
#!/usr/bin/perl -w
use URI::Escape;
-use lib '../scripts/';
+#use lib '../scripts/';
use Mimosis;
use Data::Dumper;
use HADES::TrbNet;
my ($fpga,$reg,$value) = split('-',$ENV{'QUERY_STRING'});
-$fpga = hex($fpga) if $fpga =~ /^0x/;
+$fpga = hex( $fpga ) if $fpga =~ /^0x/;
+Mimosis::set_fpga( $fpga );
+#single access mode as default
+Mimosis::set_singleAccess(1);
my $val;
-for my $i (0x40..0x4e) {
- $val = Mimosis::mimosis_register_read($fpga, $i,1); #single access mode as default
- $val &= 0xff;
- print $val."-";
- }
+for my $i (0x40 .. 0x4e) {
+ $val = Mimosis::mimosis_register_read($i);
+ $val &= 0xff;
+ print $val."-";
+}
exit 1;
#!/usr/bin/perl -w
use URI::Escape;
-use lib '../scripts/';
-use lib '../../scripts/';
+#use lib '../scripts/';
+#use lib '../../scripts/';
use Mimosis;
use Data::Dumper;
use HADES::TrbNet;
"], #VCLIP 0 - 1.54 V , 6 mV Pixel clipping amplifier voltage ",
"], #IBUFBIAS 0 - 10 μA , 312 pA Internal buffer bias (not in pixel) ",
-
);
for my $i (0..14) {
- $val = Mimosis::mimosis_register_read($fpga, $i+0x40,1); #single access mode as default
+ $val = Mimosis::mimosis_register_read($i+0x40); #single access mode as default
$val &= 0xff;
printf("[0x00%02x, %3i%s\n",$i+0x40,$val,$registers[$i]);
}
+++ /dev/null
-/* Style the tab */
-.tab {
- overflow: hidden;
- border: 1px solid #ccc;
- background-color: #f1f1f1;
-}
-
-/* Style the buttons that are used to open the tab content */
-.tab button {
- background-color: inherit;
- float: left;
- border: none;
- outline: none;
- cursor: pointer;
- padding: 14px 16px;
- transition: 0.3s;
-}
-
-/* Change background color of buttons on hover */
-.tab button:hover {
- background-color: #ddd;
-}
-
-/* Create an active/current tablink class */
-.tab button.active {
- background-color: #ccc;
-}
-
-/* Style the tab content */
-.tabcontent {
- display: none;
- padding: 6px 12px;
- border: 1px solid #ccc;
- border-top: none;
-}
+++ /dev/null
-<!DOCTYPE html>
-<html lang="en">
-
- <head>
- <title>Pulse Control</title>
- <link rel="stylesheet" type="text/css" href="pulse.css">
- <script src="pulse.js"></script>
- </head>
-
- <body>
- <h1>Pulse Control</h1>
- <p>FPGA</p> <input type="text" id="fpga">
-
- <div class="tab">
- <button class="tablinks" onclick="opentab(event, 'tab_region')" id="defaultOpen">Region</button>
- <button class="tablinks" onclick="opentab(event, 'tab_lines')">Lines</button>
- <button class="tablinks" onclick="opentab(event, 'tab_pix')">Pixel</button>
- <button class="tablinks" onclick="opentab(event, 'tab_random')">Random</button>
- </div>
-
- <div id="tab_region" class="tabcontent">
- <p>Row Divider:</p> <input type="text" id="region_row_divider_input">
- <p>Col Divider:</p> <input type="text" id="region_col_divider_input">
- <p> <input id="A" type="button" value="Region A" onChange="send('A')"> </p>
- <p> <input id="B" type="button" value="Region B" onChange="send('B')"> </p>
- <p> <input id="C" type="button" value="Region C" onChange="send('C')"> </p>
- <p> <input id="D" type="button" value="Region D" onChange="send('D')"> </p>
- </div>
-
- <div id="tab_lines" class="tabcontent">
- <p>Row Divider:</p> <input type="text" id="lines_row_divider_input">
- <p>Row</p> <input type="text" id="lines_input">
- </div>
-
- <div id="tab_pix" class="tabcontent">
- <p>Row</p> <input type="text" id="row_input">
- <p>Col</p> <input type="text" id="col_input">
- </div>
-
- <div id="tab_random" class="tabcontent">
- <p> <input id="random_button" type="button" value="Start" onChange=""> </p>
- </div>
- </body>
-
- <script>
- document.getElementById("defaultOpen").click();
- </script>
-</html>
+++ /dev/null
-
-function send_reg(reg) {
- colDiv = document.getElementById("region_col_divider_input").value;
- rowDiv = document.getElementById("region_row_divider_input").value;
- fpga = document.getElementById("fpga").value;
-
- var url = "pulse_region.pl?";
- url += "-" + fpga;
- url += "-" + colDiv;
- url += "-" + rowDiv;
- url += "-" + reg;
-
- getData(url);
-}
-
-function send_line(row) {}
-
-function send_pix(row,col) {}
-
-function getData(command,dId,callback) {
-
- var xmlhttp = null;
- var cb = null;
- xmlhttp=new XMLHttpRequest();
- cb = callback;
- var destId = dId;
- var cmd = command;
-
- xmlhttp.onreadystatechange = function() {
- if(xmlhttp.readyState == 4) {
- if(destId && document.getElementById(destId)){
- document.getElementById(destId).innerHTML = xmlhttp.responseText;
- }
- if(cb) {
- cb(xmlhttp.responseText);
- }
- }
- }
-
- xmlhttp.open("GET",command,1);
- xmlhttp.send(null);
-}
-
-function opentab(evt, name) {
-
- var i, tabcontent, tablinks;
-
- tabcontent = document.getElementsByClassName("tabcontent");
- for (i = 0; i < tabcontent.length; i++) {
- tabcontent[i].style.display = "none";
- }
-
- tablinks = document.getElementsByClassName("tablinks");
- for (i = 0; i < tablinks.length; i++) {
- tablinks[i].className = tablinks[i].className.replace(" active", "");
- }
-
- document.getElementById(name).style.display = "block";
- evt.currentTarget.className += " active";
-}
+++ /dev/null
-#!/usr/bin/perl
-
-use warnings;
-no warnings "portable";
-use URI::Escape;
-
-
-eval{
- htsponse(200,"OK");
- print "Content-type: text/html\r\n\r\n";
-# print "Location: index.html\r\n\r\n";
- };
-
-
-my ($fpga,$colDiv,$rowDiv,$region) = split('-',$ENV{'QUERY_STRING'});
-
-
-if(!defined $region) {exit 1;}
-system("cd ../scripts/sensor_check; ./inject.pl --fpga $fpga --coldiv $colDiv --rowdiv $rowDiv --region $region");
-exit 1;
document.getElementById(reg+"txt").innerHTML = value;
- if(reg == "VPH" || reg == "VPL")
- {
- vpl = document.getElementById("VPL").value
- vph = document.getElementById("VPH").value
- diff = vph - vpl;
- mean = diff%2 == 0 ? parseInt(vpl) + diff/2 : parseInt(vpl) + (diff-1)/2;
- document.getElementById("DIFFtxt").innerHTML = diff;
- document.getElementById("MEANtxt").innerHTML = mean;
- document.getElementById("DIFF").value = diff;
- document.getElementById("MEAN").value = mean;
- }
-
getData(url);
}
-
- function send_diff()
- {
-
- diff = document.getElementById("DIFF").value;
- mean = document.getElementById("MEAN").value;
-
- vph = diff%2 == 0 ? parseInt(mean) + diff/2 : parseInt(mean) + (diff-1)/2;
- vpl = diff%2 == 0 ? parseInt(mean) - diff/2 : parseInt(mean) - (diff+1)/2;
-
- document.getElementById("VPL").value = vpl;
- document.getElementById("VPH").value = vph;
-
- send("VPH");
- send("VPL");
- }
-
-
function getData(command,dId,callback) {
var xmlhttp = null;
<h1>DAC Control</h1>
<div class="dac_container">
FPGA <input class="dac_input" type="text" id="fpga" onChange="loadvalues()">
- <a id="DownloadLink" href="getdacfile.pl" download="CONF_dac.pl" target="_blank">Download</a>
+ <!-- <a id="DownloadLink" href="getdacfile.pl" download="CONF_dac.pl" target="_blank">Download</a> -->
+ <a id="DownloadLink" href="" onclick="set_href()" download="CONF_dac.pl">Download</a>
+
<input class="dac_input" type="text" id="filename" onChange="setfilename()" value="CONF_dac.pl">
<div class="slider_container"> <div class="slider_name">VCASP</div> <input class="dac_input" id="VCASP" type="range" min="0" max="255" step="1.0" value="67" onChange="send('VCASP')"><div class="slider_value" id="VCASPtxt"></div></div>
<div class="slider_container"> <div class="slider_name">VCASNA</div> <input class="dac_input" id="VCASA" type="range" min="0" max="255" step="1.0" value="100" onChange="send('VCASA')"><div class="slider_value" id="VCASAtxt"></div></div>
<div class="slider_container"> <div class="slider_name">VRESET</div> <input class="dac_input" id="VRESET" type="range" min="0" max="255" step="1.0" value="166" onChange="send('VRESET')"><div class="slider_value" id="VRESETtxt"></div></div>
<div class="slider_container"> <div class="slider_name">VCLIP</div> <input class="dac_input" id="VCLIP" type="range" min="0" max="255" step="1.0" value="166" onChange="send('VCLIP')"><div class="slider_value" id="VCLIPtxt"></div></div>
<br>
- <div class="slider_container"> <div class="slider_name">DIFF</div> <input class="dac_input" id="DIFF" type="range" min="0" max="255" step="1.0" value="166" onChange="send_diff()"><div class="slider_value" id="DIFFtxt"></div></div>
- <div class="slider_container"> <div class="slider_name">MEAN</div> <input class="dac_input" id="MEAN" type="range" min="0" max="255" step="1.0" value="166" onChange="send_diff()"><div class="slider_value" id="MEANtxt"></div></div>
</div>
</body>
loadvalues();
function loadvalues() {
- document.getElementById("DownloadLink").href="getdacfile.pl?"+document.getElementById("fpga").value;
+ // document.getElementById("DownloadLink").href="getdacfile.pl?"+document.getElementById("fpga").value;
getData("getdac.pl?"+document.getElementById("fpga").value,"",showDacs);
}
+
function setfilename() {
document.getElementById("DownloadLink").download=document.getElementById("filename").value;
}
document.getElementById("VCASNtxt").innerHTML = vals[12];
document.getElementById("VCLIPtxt").innerHTML = vals[13];
document.getElementById("IBUFBIAStxt").innerHTML = vals[14];
- diff = vals[5] - vals[4];
- mean = parseInt(vals[4]) + diff/2;
- document.getElementById("DIFFtxt").innerHTML = diff;
- document.getElementById("MEANtxt").innerHTML = mean;
document.getElementById("IBIAS").value = vals[0];
document.getElementById("ITHR").value = vals[1];
document.getElementById("VCASN").value = vals[12];
document.getElementById("VCLIP").value = vals[13];
document.getElementById("IBUFBIAS").value = vals[14];
-
- document.getElementById("DIFF").value = diff
- document.getElementById("MEAN").value = mean;
}
- </script>
-
+ function set_href() {
+ document.getElementById("DownloadLink").href="data:application/octet-stream;charset=utf-8;base64,"
+ + btoa("[ 0x40, 0x" + ("00" + parseInt(document.getElementById("IBIAS").value).toString(16)).slice(-2) + " ], #IBIAS 0 - 80 nA , 312 pA Pixel current \n"
+ + "[ 0x41, 0x" + ("00" + parseInt(document.getElementById("ITHR").value).toString(16)).slice(-2) + " ], #ITHR 0 - 2.5 nA , 9.8 pA Pixel current \n"
+ + "[ 0x42, 0x" + ("00" + parseInt(document.getElementById("IDB").value).toString(16)).slice(-2) + " ], #IDB 0 - 40 nA , 157 pA Pixel current \n"
+ + "[ 0x43, 0x" + ("00" + parseInt(document.getElementById("VRESET").value).toString(16)).slice(-2) + " ], #VRESET 0.37 - 1.79 V , 6 mV Pixel input amplifier reset voltage \n"
+ + "[ 0x44, 0x" + ("00" + parseInt(document.getElementById("VPL").value).toString(16)).slice(-2) + " ], #VPL 0.37 - 1.79 V , 6 mV Pixel voltage for charge injection (low value) \n"
+ + "[ 0x45, 0x" + ("00" + parseInt(document.getElementById("VPH").value).toString(16)).slice(-2) + " ], #VPH 0.37 - 1.79 V , 6 mV Pixel voltage for charge injection (high \n"
+ + "[ 0x46, 0x" + ("00" + parseInt(document.getElementById("VPH_FINE").value).toString(16)).slice(-2) + " ], #VPH_FINE 0 - 256 mV , 1 mV value) VPH+VPH_FINE \n"
+ + "[ 0x47, 0x" + ("00" + parseInt(document.getElementById("VCASP").value).toString(16)).slice(-2) + " ], #VCASP 0 - 1.54 V , 6 mV Pixel voltage \n"
+ + "[ 0x48, 0x" + ("00" + parseInt(document.getElementById("VCASA").value).toString(16)).slice(-2) + " ], #VCASNA 0 - 1.54 V , 6 mV Pixel threshold voltage for submatrix A \n"
+ + "[ 0x49, 0x" + ("00" + parseInt(document.getElementById("VCASB").value).toString(16)).slice(-2) + " ], #VCASNB 0 - 1.54 V , 6 mV Pixel threshold voltage for submatrix B \n"
+ + "[ 0x4a, 0x" + ("00" + parseInt(document.getElementById("VCASC").value).toString(16)).slice(-2) + " ], #VCASNC 0 - 1.54 V , 6 mV Pixel threshold voltage for submatrix C \n"
+ + "[ 0x4b, 0x" + ("00" + parseInt(document.getElementById("VCASD").value).toString(16)).slice(-2) + " ], #VCASND 0 - 1.54 V , 6 mV Pixel threshold voltage for submatrix D \n"
+ + "[ 0x4c, 0x" + ("00" + parseInt(document.getElementById("VCASN").value).toString(16)).slice(-2) + " ], #VCASN2 0 - 1.54 V , 6 mV Pixel voltage \n"
+ + "[ 0x4d, 0x" + ("00" + parseInt(document.getElementById("VCLIP").value).toString(16)).slice(-2) + " ], #VCLIP 0 - 1.54 V , 6 mV Pixel clipping amplifier voltage \n"
+ + "[ 0x4e, 0x" + ("00" + parseInt(document.getElementById("IBUFBIAS").value).toString(16)).slice(-2) + " ], #IBUFBIAS 0 - 10 μA , 312 pA Internal buffer bias (not in pixel) ");
+ }
+
+ </script>
</html>
--- /dev/null
+#!/usr/bin/perl -w
+use URI::Escape;
+#use lib '../scripts/';
+use Mimosis;
+use Data::Dumper;
+use HADES::TrbNet;
+
+trb_init_ports() or die trb_strerror();
+
+my $fpga = 0xa000;
+
+Mimosis::set_fpga( $fpga );
+Mimosis::set_singleAccess(1);
+
+
+my $val;
+
+for my $i (0x40 .. 0x4e) {
+ $val = Mimosis::mimosis_register_read( $i ); #single access mode as default
+ printf(STDERR "%x $val\n", $i);
+ $val &= 0xff;
+ print $val."-";
+}
elif [[ "$DAQOPSERVER" == "jspc29:150" ]]; then
echo "start http server for Lab317."
./httpi localhost 3333
-elif [[ "$DAQOPSERVER" == "jspc29:31" ]]; then
+elif [[ "$DAQOPSERVER" == "jspc29:7" ]]; then
+ echo "start http server for Lab318."
+ ./httpi localhost 3332
+elif [[ "$DAQOPSERVER" == "jspc29:109" ]]; then
echo "start http server for Probestation."
./httpi localhost 3331
else