Exemplo n.º 1
0
 def WriteIOPorts(self, hdlwriter):
     Dev.Debug(Dev.Info, "ConstantConnector.WriteIOPorts(self,hdlwriter)")
     # I may want to support a direction flag for these connectors
     if self.Width is None:
         Dev.Debug(
             Dev.Stop, "Fatal Error: ConstantConnector " + self.Name +
             " was never configured with a Width.")
Exemplo n.º 2
0
 def ConfigureEachOther(self, prj, v):
     if not (v.Width is None):
         if self.Width is None:
             self.Width = v.Width
             prj.AddChangedConnector(self)
         elif (self.Width != v.Width):
             Dev.Debug(
                 Dev.Error, "Error: ConstantConnector " + self.Name +
                 " found an inconsistancy with Local Connector named " +
                 v.Name + " in the configuration.")
Exemplo n.º 3
0
 def __init__(self, name, comp, value):
     Dev.Debug(Dev.Info,
               "ConstantConnector.__init__(self,supername,name,start,end)")
     self.Comp = comp
     self.Conn = None
     self.LocalConn = None
     self.IOType = HDLIOType.Wire
     self.Type = HDLNetType.Wire
     self.Value = value
     self.Width = None
     self.Name = name
     self.IsUsed = 1
     self.Anonymous = 0
     if not (comp is None):
         comp.AddConnector(self)
Exemplo n.º 4
0
 def Duplicate(self):
     Dev.Debug(Dev.Info, "ConstantConnector.Duplicate(self)")
     Dev.Debug(
         Dev.Warning,
         "Error: ConstantConnector does not know how to duplicate itself.")
     return dup
Exemplo n.º 5
0
 def WriteIOPortBindingName(self):
     Dev.Debug(Dev.Info,
               "ConstantConnector.WriteIOPortBindingName(self,hdlwriter)")
     return Util.VerilogBinary(self.Value, self.Width)
Exemplo n.º 6
0
 def WriteIOPortLogic(self, hdlwriter):
     Dev.Debug(Dev.Info,
               "ConstantConnector.WriteIOPortLogic(self,hdlwriter)")
Exemplo n.º 7
0
 def WriteIOPortBindings(self, hdlwriter):
     Dev.Debug(Dev.Info,
               "ConstantConnector.WriteIOPortBindings(self,hdlwriter)")
     hdlwriter.Write("\t." + self.Name + "(" + self.Conn.LocalName + ")")
Exemplo n.º 8
0
 def WriteIOPortNames(self, hdlwriter):
     Dev.Debug(Dev.Info,
               "ConstantConnector.WriteIOPortNames(self,hdlwriter)")
     Dev.Debug(
         Dev.Warning,
         "Error: ConstantConnector cannot be used as an input/output.")
Exemplo n.º 9
0
 def ParameterizationCheck(self, prj):
     Dev.Debug(Dev.Info, "ConstantConnector.ParameterizationCheck(self)")
     if self.Width is None:
         Dev.Debug(
             Dev.Error, "Error: ConstantConnector " + self.Name +
             " failed to configure the width parameter.")