--- a/plugins/c_ext/CFileEditor.py Mon May 16 12:41:23 2011 +0200
+++ b/plugins/c_ext/CFileEditor.py Wed May 18 11:21:10 2011 +0200
@@ -529,7 +529,7 @@
editor = wx.grid.GridCellTextEditor()
editor = wx.grid.GridCellChoiceEditor()
- editor.SetParameters("input,output")
+ editor.SetParameters("input,memory,output") @@ -770,6 +770,11 @@
if self.Table.GetValueByName(i, "Class") == "input":
+ elif self.Table.GetValueByName(row, "Class") == "memory": + if self.Table.GetValueByName(i, "Class") == "memory": --- a/plugins/c_ext/c_ext.py Mon May 16 12:41:23 2011 +0200
+++ b/plugins/c_ext/c_ext.py Wed May 18 11:21:10 2011 +0200
@@ -166,13 +166,17 @@
current_location = ".".join(map(str, self.GetCurrentLocation()))
+ input = memory = output = 0 for var in self.CFile.variables.getvariable():
var_size = self.GetSizeOfType(var.gettype())
if var.getclass() == "input":
var_class = LOCATION_VAR_INPUT
var_location = "%%I%s%s.%d"%(var_size, current_location, input)
+ elif var.getclass() == "memory": + var_class = LOCATION_VAR_INPUT + var_location = "%%M%s%s.%d"%(var_size, current_location, memory) var_class = LOCATION_VAR_OUTPUT
var_location = "%%Q%s%s.%d"%(var_size, current_location, output)
@@ -303,12 +307,15 @@
+ inputs = memories = outputs = 0 for variable in self.CFile.variables.variable:
var = {"Name" : variable.getname(), "Type" : variable.gettype()}
if variable.getclass() == "input":
var["location"] = "__I%s%s_%d"%(self.GetSizeOfType(var["Type"]), location_str, inputs)
+ elif variable.getclass() == "memory": + var["location"] = "__M%s%s_%d"%(self.GetSizeOfType(var["Type"]), location_str, memories) var["location"] = "__Q%s%s_%d"%(self.GetSizeOfType(var["Type"]), location_str, outputs)
--- a/plugins/c_ext/cext_xsd.xsd Mon May 16 12:41:23 2011 +0200
+++ b/plugins/c_ext/cext_xsd.xsd Wed May 18 11:21:10 2011 +0200
@@ -20,6 +20,7 @@
<xsd:restriction base="xsd:string">
<xsd:enumeration value="input"/>
+ <xsd:enumeration value="memory"/> <xsd:enumeration value="output"/>