Unverified Commit 7a609aa8 by Zhiang Wang Committed by GitHub

Merge pull request #39 from TAKE72K/formatTranslate

FormatTranslators
parents 22aabe49 184d0604
...@@ -530,8 +530,8 @@ class BookShelf2ProBufFormat: ...@@ -530,8 +530,8 @@ class BookShelf2ProBufFormat:
for sink in sink_list: for sink in sink_list:
inst_name = sink[0] inst_name = sink[0]
if (self.insts[inst_name].GetType() == "MACRO"): if (self.insts[inst_name].GetType() == "MACRO"):
pin_name = "Pinput_" + str(len(self.insts[inst_name].GetInputPins())) pin_name = inst_name + "/Pinput_" + str(len(self.insts[inst_name].GetInputPins()))
self.insts[inst_name].AddInputPin(MacroPin(pin_name, inst_name, sink[1], sink[2])) self.insts[inst_name].AddInputPin(MacroPin(pin_name, inst_name, sink[1], sink[2], "MACRO"))
sink_name_list.append(pin_name) sink_name_list.append(pin_name)
else: else:
sink_name_list.append(inst_name) sink_name_list.append(inst_name)
...@@ -539,8 +539,8 @@ class BookShelf2ProBufFormat: ...@@ -539,8 +539,8 @@ class BookShelf2ProBufFormat:
driver_name = driver[0] driver_name = driver[0]
if (self.insts[driver_name].GetType() == "MACRO"): if (self.insts[driver_name].GetType() == "MACRO"):
pin_id = len(self.insts[driver_name].GetOutputPins()) pin_id = len(self.insts[driver_name].GetOutputPins())
pin_name = "Poutput_" + str(pin_id) pin_name = inst_name + "/Poutput_" + str(pin_id)
macro_pin = MacroPin(pin_name, driver_name, driver[1], driver[2]) macro_pin = MacroPin(pin_name, driver_name, driver[1], driver[2], "MACRO")
macro_pin.AddSinks(sink_name_list) macro_pin.AddSinks(sink_name_list)
self.insts[driver_name].AddOutputPin(macro_pin) self.insts[driver_name].AddOutputPin(macro_pin)
else: else:
......
...@@ -7,7 +7,9 @@ if __name__ == '__main__': ...@@ -7,7 +7,9 @@ if __name__ == '__main__':
# set up inputs # set up inputs
benchmark_dir = './DAC2012_testcases' benchmark_dir = './DAC2012_testcases'
design = 'superblue19' design = 'superblue19'
if(len(sys.argv)==3):
benchmark_dir = sys.argv[1]
design = sys.argv[2]
# other parameters # other parameters
file_dir = benchmark_dir + '/' + design file_dir = benchmark_dir + '/' + design
output_file = design + ".plc" output_file = design + ".plc"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment