Example #1
0
    def get_vhdl_name(self, Inout=None):
        if Inout is None:
            return str(self.__hdl_name__)

        if Inout == InOut_t.input_t:
            return vc_helper.append_hdl_name(str(self.__hdl_name__), "_s2m")

        if Inout == InOut_t.output_t:
            return vc_helper.append_hdl_name(str(self.__hdl_name__), "_m2s")

        return None
Example #2
0
    def get_vhdl_name(self, Inout=None):
        if Inout is None:
            return str(self.__hdl_name__)

        if self.__v_classType__ == v_classType_t.Slave_t:
            Inout = InoutFlip(Inout)

        if Inout == InOut_t.input_t:
            return vc_helper.append_hdl_name(str(self.__hdl_name__), "_s2m")

        if Inout == InOut_t.output_t:
            return vc_helper.append_hdl_name(str(self.__hdl_name__), "_m2s")

        return None
    def extract_conversion_types_transition_type_impl(self,
                                                      obj,
                                                      exclude_class_type=None,
                                                      filter_inout=None,
                                                      Inout=None):
        ret = []
        if Inout == InOut_t.input_t:
            name = obj.__hdl_converter__.get_NameSlave2Master(obj)
            suffix = "_s2m"

        else:
            name = obj.__hdl_converter__.get_NameMaster2Slave(obj)
            suffix = "_m2s"

        x = v_class(name, obj._varSigConst)
        x.__v_classType__ = v_classType_t.Record_t
        x.__abstract_type_info__.vetoHDLConversion = True

        x.__hdl_name__ = vc_helper.append_hdl_name(obj.__hdl_name__, suffix)
        x._Inout = Inout
        if obj._Inout == InOut_t.input_t or obj._Inout == InOut_t.Slave_t:
            x._Inout = InoutFlip(x._Inout)
            Inout = InoutFlip(Inout)

        ys = obj.getMember(Inout)
        for y in ys:
            setattr(x, y["name"], y["symbol"])
        ret.append({"suffix": suffix, "symbol": x})

        return ret
    def extract_conversion_types_Master_Slave_impl(self,
                                                   obj,
                                                   exclude_class_type=None,
                                                   filter_inout=None,
                                                   VarSig=None,
                                                   Suffix=""):
        ret = []
        if VarSig == varSig.signal_t:
            name = obj.__hdl_converter__.get_NameSignal(obj)
        else:
            name = obj._type
        x = v_class(name, VarSig)
        x.__v_classType__ = v_classType_t.Record_t
        x.__abstract_type_info__.vetoHDLConversion = True

        x._Inout = obj._Inout
        x.__writeRead__ = obj.__writeRead__
        x.__hdl_name__ = vc_helper.append_hdl_name(str(obj.__hdl_name__),
                                                   Suffix)
        ys = obj.getMember(VaribleSignalFilter=VarSig)
        if len(ys) > 0:
            for y in ys:
                setattr(x, y["name"], y["symbol"])

            ret.append({"suffix": Suffix, "symbol": x})
        return ret