I am attempting to update from OpenTap 9.23.1 to 9.29.1.
The main motivation is to be able to use the new cross platform Editor for Linux.
I installed opentap 9.29.1 on Ubuntu 20.04.
If I install my existing plugins I previously built using net6.0 / opentap 9.23, everything works fine.
If I rebuild my plugins using net9.0 and opentap 9.29 sdk, everything works fine except the one python instrument plugin.
Below is the interface for the instrument in my ‘M9000’ plugin
namespace Jtag
{
// Interface to JtagInstrument implemented in python. Python is used for the
// instrument because the JTAG library urjtag has an existing python binding
public interface IJtagInstrument : IInstrument
{
void detect(bool force=true);
void reset();
void part(int part);
void svf(string path, int stop, long freq);
void flashmem(int addr, string path);
void instruction(string instr);
void shift_dr();
string get_dr_in();
void set_dr_in(string bits);
void set_signal(int part, string name, int dir, int value);
int get_signal(int part, string name);
int len();
}
}
And the implementation of the python Instrument
import opentap
from opentap import *
from System import String, Int32, Enum, Boolean
import OpenTap
from OpenTap import Log, DisplayAttribute, Display, FilePathAttribute, FilePath
import urjtag
import clr
clr.AddReference("M9000")
from Jtag import IJtagInstrument # JtagInstrument c# interface we implement
@attribute(OpenTap.Display("JTAG Interface", "JTAG Interface adapter instrument.", "M9000 FCT"))
class JtagInstrument(Instrument, IJtagInstrument):
Cable = property(String, "m9000-fct")\
.add_attribute(OpenTap.Display("Cable", "Name of the cable driver"))
def __init__(self):
super(JtagInstrument, self).__init__()
self.Name = "JtagInstrument"
self.jtag = None
self._inited=False
def Open(self):
self.detected = False
self.jtag = urjtag.chain()
self.jtag.cable(self.Cable)
self.reset()
def Close(self):
self.jtag.disconnect()
def detect(self, force=True):
# detect can't be called as part of the instrument open sequence since
# the DUT is not available at that time. We track if detection has
# happened and allow it to be cached if force is overridden
if (force or not self.detected):
self.jtag.tap_detect()
self.detected = True
def reset(self):
self.jtag.reset()
def part(self, part):
self.jtag.part(part)
def svf(self, svf, stop, freq):
self.jtag.run_svf(svf, stop, freq);
def flashmem(self, addr, image):
self.jtag.detectflash(0)
self.jtag.flashmem(str(addr), image, 1)
def instruction(self, inst):
self.jtag.set_instruction(inst)
self.jtag.shift_ir()
self._instruction = inst
def shift_dr(self):
self.jtag.shift_dr()
def get_dr_in(self):
return self.jtag.get_dr_in_string();
def set_dr_in(self, bits):
self.jtag.set_dr_in(bits);
def set_signal(self, part, sig, out, val):
self.jtag.set_signal(part, sig, out, val)
def get_signal(self, part, sig):
return self.jtag.get_signal(part, sig)
def len(self):
return self.jtag.len()
Again, this works if I build my M9000 plugin using net6.0 and opentap 9.23 sdk, but if I build with net9.0 and opentap 9.29 sdk, I have a python error when the JtagInstrument is installed.
Caught exception loading M9000.JtagInstrument: No module named 'Jtag'
The Python plugin version is 3.1.
The version of python on Ubuntu 20.04 is Python 3.8.10
I’m not very familiar with python dotnet and what things would cause the assembly to load but still fail to find the module.
Both python and opentap are 64bit.
Since the clr.AddReference succeeds, I am assuming this isn’t any kind of python path problem?
Are there requirements on the version of Python / Python plugin that go along with updating to net9.0?
Thanks,
Wittrock