Skip to content
Snippets Groups Projects
Commit 24cb2c81 authored by Magnus.Ersdal's avatar Magnus.Ersdal
Browse files

ggg

parent 47e6985a
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ class Seq(): ...@@ -14,7 +14,7 @@ class Seq():
def __init__(self,sca): def __init__(self,sca):
self.tms_bits = "" self.tms_bits = ""
self.tdi_bits = "" self.tdi_bits = ""
self.tdo_bits = "" self.tdo_bits = [] # store of TDO bits.
self.sca = sca self.sca = sca
def check_to_run(self,length): def check_to_run(self,length):
...@@ -22,12 +22,20 @@ class Seq(): ...@@ -22,12 +22,20 @@ class Seq():
self.call_run(length) self.call_run(length)
def call_run(self,length): def call_run(self,length):
write128(self.tms_bits[:FIFOLEN],self.tdi_bits[:FIFOLEN],self.sca) write128(self.tms_bits[:FIFOLEN],self.tdi_bits[:FIFOLEN],self.sca) #write
self.tdo_bits += read128(self.sca) self.tdo_bits.append(read128(self.sca)) # read
self.tms_bits = self.tms_bits[FIFOLEN:] self.tms_bits = self.tms_bits[FIFOLEN:]
self.tdi_bits = self.tdi_bits[FIFOLEN:] self.tdi_bits = self.tdi_bits[FIFOLEN:]
self.check_to_run(length - FIFOLEN) self.check_to_run(length - FIFOLEN)
def get_tdo_bits(self):
m = self.tdo_bits
self.tdo_bits = []
return "".join(m)
def get_tdo_bits_list(self):
return self.tdo_bits
def queue(self, tms_bits, tdi_bits): def queue(self, tms_bits, tdi_bits):
"""fill a queue with bits for the JTAG""" """fill a queue with bits for the JTAG"""
self.tms_bits += tms_bits self.tms_bits += tms_bits
......
...@@ -21,9 +21,9 @@ class BarChannel: ...@@ -21,9 +21,9 @@ class BarChannel:
# print("ROC-BarChannel INIT, pcie_id: ", pcie_id, "BAR_CH: ", bar_ch) # print("ROC-BarChannel INIT, pcie_id: ", pcie_id, "BAR_CH: ", bar_ch)
self.pcie_id = pcie_id self.pcie_id = pcie_id
self.bar_ch = bar_ch self.bar_ch = bar_ch
self.registers = {0x4224030: 0xFFFFFF00, self.registers = {0x4224030: 0xFFAFFF00,
0x4224034: 0xFFFFFF00, 0x4224034: 0xFFFFFF00,
0x4224038: 0xFFFFFF00} # testing 0x4224038: 0xFFFFFF00} # testing 30 is the data from EC
self.readcount = 0 self.readcount = 0
self.writecount = 0 self.writecount = 0
global z global z
......
...@@ -256,6 +256,7 @@ class svfinterpreter(): ...@@ -256,6 +256,7 @@ class svfinterpreter():
print("Error, ", svfcase, "function not in command list") print("Error, ", svfcase, "function not in command list")
def end(self): def end(self):
self.jtg_seq.end_clean() self.jtg_seq.end_clean()
print(self.jtg_seq.get_tdo_bits_list())
# self.jtg.sca.ch.__del__() # safe shutdown. # self.jtg.sca.ch.__del__() # safe shutdown.
svfcommands = { svfcommands = {
......
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 26 23:43:04 2018
@author: Magnus Rentsch Ersdal (magnus.ersdal@uib.no)
"""
"""requires a pre-load of the commands in a variable called "li" SE"""
"""
full read / interpret :L operation completed in 8 minutes 8.541882 seconds
without print: operation completed in 3 minutes 10.838241 seconds
5 secs
6 minutes 29.227718 seconds
before move:
operation completed in 4 minutes 41.998992 seconds
after move1:
operation completed in 6 minutes 32.186195 seconds
after move2:
operation completed in 5 minutes 28.346667 seconds
after move3:
operation completed in 4 minutes 59.913497 seconds
200klines
MEDIUM logging :
operation completed in 0 minutes 27.715771 seconds
LOW logging
"""
print("start!")
import svf_intepreter as interpreter
from stopwatch import Stopwatch
from svf_separate_commands import read_svf
from hwdriver.SCA import Sca
from jtag_if.jtag_io import read128
import copy
import settings
import jtag_if.jtag_ctrl
#settings.init()
def space():
print("====================================================================")
def littlespace():
print("------")
li = read_svf("../idcode.svf")#("../p_400klines.svf")#("../p_reduced.svf")
# operation completed in 4 minutes 27.190409 seconds for 200klines with delays.
# operation completed in 4 minutes 56.811993 seconds for 400klines with delays.
# operation completed in 8 minutes 8.541882 seconds
# operation completed in 2 minutes 30.999758 seconds with no delays.. .
listone = copy.deepcopy(li)
sw1 = Stopwatch()
z = settings.z
id_card = 1
gbt_ch = 0
board = "CRU"
sca = Sca(id_card, 2, gbt_ch, board, logger = z)
#def __init__(self, pcie_id, bar_ch, gbt_ch, board, debug=None,logger = None):
with z:
try:
i = 0
svf = interpreter.svfinterpreter(z, sca)
space()
for test in listone:
z.log("testing: {}".format(test))
svf.caller(test)
z.log("---end small test ---")
i += 1
if i % 100_000 == 0:
print(".", end="")
svf.end()
except KeyboardInterrupt:
print("----- C-C detected! -----")
finally:
sw1.stop()
print("ran {} tests".format(i))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment