Loading .project +1 −1 Original line number Original line Diff line number Diff line Loading @@ -107,7 +107,7 @@ <link> <link> <name>vivado_logs/VivadoTimingReportImplemented.log</name> <name>vivado_logs/VivadoTimingReportImplemented.log</name> <type>1</type> <type>1</type> <location>/home/andrey/git/x393/vivado_logs/VivadoTimingReportImplemented-20150314001725869.log</location> <location>/home/andrey/git/x393/vivado_logs/VivadoTimingReportImplemented-20150316202414190.log</location> </link> </link> <link> <link> <name>vivado_logs/VivadoTimingReportSynthesis.log</name> <name>vivado_logs/VivadoTimingReportSynthesis.log</name> Loading .settings/com.elphel.vdt.VivadoTimingReportImplemented.prefs 0 → 100644 +2 −0 Original line number Original line Diff line number Diff line com.elphel.store.context.VivadoTimingReportImplemented=VivadoTimingReportImplemented_132_rawfile<-@\#\#@-> eclipse.preferences.version=1 includes/x393_tasks01.vh +3 −3 Original line number Original line Diff line number Diff line Loading @@ -81,6 +81,9 @@ input [29:0] address; input [29:0] address; input [31:0] data; input [31:0] data; begin begin `ifdef DEBUG_WR_SINGLE $display("axi_write_single_w %h:%h @ %t",address,data,$time); `endif axi_write_single ({address,2'b0},data); axi_write_single ({address,2'b0},data); end end endtask endtask Loading @@ -89,9 +92,6 @@ input [31:0] address; input [31:0] address; input [31:0] data; input [31:0] data; begin begin `ifdef DEBUG_WR_SINGLE $display("axi_write_single %h:%h @ %t",address,data,$time); `endif axi_write_addr_data( axi_write_addr_data( GLOBAL_WRITE_ID, // id GLOBAL_WRITE_ID, // id // address << 2, // addr // address << 2, // addr Loading py393/test_mcntrl.py +18 −2 Original line number Original line Diff line number Diff line Loading @@ -170,6 +170,7 @@ USAGE ''' % (program_shortdesc, __author__,str(__date__)) ''' % (program_shortdesc, __author__,str(__date__)) preDefines={} preDefines={} preParameters={} preParameters={} showResult=False try: try: # Setup argument parser # Setup argument parser parser = ArgumentParser(description=program_license, formatter_class=RawDescriptionHelpFormatter,fromfile_prefix_chars='@') parser = ArgumentParser(description=program_license, formatter_class=RawDescriptionHelpFormatter,fromfile_prefix_chars='@') Loading Loading @@ -353,6 +354,9 @@ USAGE line ="" line ="" while True: while True: line=raw_input('x393%s--> '%('','(simulated)')[args.simulated]).strip() line=raw_input('x393%s--> '%('','(simulated)')[args.simulated]).strip() #remove comment from the input line if line.find("#") > 0: line=line[:line.find("#")] lineList=line.split() lineList=line.split() if not line: if not line: print ('Use "quit" to exit, "help" - for help') print ('Use "quit" to exit, "help" - for help') Loading @@ -365,7 +369,18 @@ USAGE print ("Usage: %s %s"%(name,sFuncArgs)) print ("Usage: %s %s"%(name,sFuncArgs)) print ('\n"parameters" and "defines" list known defined parameters and macros') print ('\n"parameters" and "defines" list known defined parameters and macros') print ("args.exception=%d, QUIET=%d"%(args.exceptions,QUIET)) print ("args.exception=%d, QUIET=%d"%(args.exceptions,QUIET)) print ("Enter 'R' to toggle show/hide command results, now it is %s"%(("OFF","ON")[showResult])) elif lineList[0].upper() == 'R': if len(lineList)>1: if (lineList[1].upper() == "ON") or (lineList[1].upper() == "1") or (lineList[1].upper() == "TRUE"): showResult=True elif (lineList[1].upper() == "OFF") or (lineList[1].upper() == "0") or (lineList[1].upper() == "FALSE"): showResult=False else: print ("Unrecognized parameter %s for 'R' command"%lineList[1]) else: showResult = not showResult print ("Show results mode is now %s"%(("OFF","ON")[showResult])) # elif (len(line) > len("help")) and (line[:len("help")]=='help'): # elif (len(line) > len("help")) and (line[:len("help")]=='help'): elif lineList[0] == 'help': elif lineList[0] == 'help': # helpFilter=line[len('help'):].strip() # helpFilter=line[len('help'):].strip() Loading Loading @@ -431,6 +446,7 @@ USAGE else: else: cmdLine=line.split() cmdLine=line.split() rslt= execTask(cmdLine) rslt= execTask(cmdLine) if showResult: print (' Result: '+hx(rslt)) print (' Result: '+hx(rslt)) #http://stackoverflow.com/questions/11781265/python-using-getattr-to-call-function-with-variable-parameters #http://stackoverflow.com/questions/11781265/python-using-getattr-to-call-function-with-variable-parameters #*getattr(foo,bar)(*params) #*getattr(foo,bar)(*params) Loading py393/verilog_utils.py +30 −4 Original line number Original line Diff line number Diff line Loading @@ -127,9 +127,9 @@ def hexMultiple(data): subResult=[] subResult=[] for subItem in item: for subItem in item: try: try: rslt.append("0x%x"%subItem) subResult.append("0x%x"%subItem) except: except: rslt.append(str(subItem)) subResult.append(str(subItem)) rslt.append(subResult) rslt.append(subResult) else: else: try: try: Loading @@ -144,3 +144,29 @@ def hexMultiple(data): rslt = str(item) rslt = str(item) return rslt return rslt def checkIntArgs(names,var_dict): for name in names: try: v=var_dict[name] except: raise Exception("ERROR: '%s' is not among %s"%(name,str(var_dict.keys()))) if not isinstance(v,int): print ("Expected an integer for '%s', got '%s"%(name,v)) try: d=int(v,16) print ("Did you mean 0x%x ?"%d) except: pass raise Exception("Not a number for '%s' : '%s'"%(name,v)) def smooth2d(arr2d): smooth=[] l=len(arr2d)-1 for i in range(l+1): im=(0,i-1)[i>0] ip=(l,i+1)[i<l] row=[] for j in range(len(arr2d[i])): row.append(0.5*arr2d[i][j]+0.25*(arr2d[ip][j]+arr2d[im][j])) smooth.append(row) return smooth No newline at end of file Loading
.project +1 −1 Original line number Original line Diff line number Diff line Loading @@ -107,7 +107,7 @@ <link> <link> <name>vivado_logs/VivadoTimingReportImplemented.log</name> <name>vivado_logs/VivadoTimingReportImplemented.log</name> <type>1</type> <type>1</type> <location>/home/andrey/git/x393/vivado_logs/VivadoTimingReportImplemented-20150314001725869.log</location> <location>/home/andrey/git/x393/vivado_logs/VivadoTimingReportImplemented-20150316202414190.log</location> </link> </link> <link> <link> <name>vivado_logs/VivadoTimingReportSynthesis.log</name> <name>vivado_logs/VivadoTimingReportSynthesis.log</name> Loading
.settings/com.elphel.vdt.VivadoTimingReportImplemented.prefs 0 → 100644 +2 −0 Original line number Original line Diff line number Diff line com.elphel.store.context.VivadoTimingReportImplemented=VivadoTimingReportImplemented_132_rawfile<-@\#\#@-> eclipse.preferences.version=1
includes/x393_tasks01.vh +3 −3 Original line number Original line Diff line number Diff line Loading @@ -81,6 +81,9 @@ input [29:0] address; input [29:0] address; input [31:0] data; input [31:0] data; begin begin `ifdef DEBUG_WR_SINGLE $display("axi_write_single_w %h:%h @ %t",address,data,$time); `endif axi_write_single ({address,2'b0},data); axi_write_single ({address,2'b0},data); end end endtask endtask Loading @@ -89,9 +92,6 @@ input [31:0] address; input [31:0] address; input [31:0] data; input [31:0] data; begin begin `ifdef DEBUG_WR_SINGLE $display("axi_write_single %h:%h @ %t",address,data,$time); `endif axi_write_addr_data( axi_write_addr_data( GLOBAL_WRITE_ID, // id GLOBAL_WRITE_ID, // id // address << 2, // addr // address << 2, // addr Loading
py393/test_mcntrl.py +18 −2 Original line number Original line Diff line number Diff line Loading @@ -170,6 +170,7 @@ USAGE ''' % (program_shortdesc, __author__,str(__date__)) ''' % (program_shortdesc, __author__,str(__date__)) preDefines={} preDefines={} preParameters={} preParameters={} showResult=False try: try: # Setup argument parser # Setup argument parser parser = ArgumentParser(description=program_license, formatter_class=RawDescriptionHelpFormatter,fromfile_prefix_chars='@') parser = ArgumentParser(description=program_license, formatter_class=RawDescriptionHelpFormatter,fromfile_prefix_chars='@') Loading Loading @@ -353,6 +354,9 @@ USAGE line ="" line ="" while True: while True: line=raw_input('x393%s--> '%('','(simulated)')[args.simulated]).strip() line=raw_input('x393%s--> '%('','(simulated)')[args.simulated]).strip() #remove comment from the input line if line.find("#") > 0: line=line[:line.find("#")] lineList=line.split() lineList=line.split() if not line: if not line: print ('Use "quit" to exit, "help" - for help') print ('Use "quit" to exit, "help" - for help') Loading @@ -365,7 +369,18 @@ USAGE print ("Usage: %s %s"%(name,sFuncArgs)) print ("Usage: %s %s"%(name,sFuncArgs)) print ('\n"parameters" and "defines" list known defined parameters and macros') print ('\n"parameters" and "defines" list known defined parameters and macros') print ("args.exception=%d, QUIET=%d"%(args.exceptions,QUIET)) print ("args.exception=%d, QUIET=%d"%(args.exceptions,QUIET)) print ("Enter 'R' to toggle show/hide command results, now it is %s"%(("OFF","ON")[showResult])) elif lineList[0].upper() == 'R': if len(lineList)>1: if (lineList[1].upper() == "ON") or (lineList[1].upper() == "1") or (lineList[1].upper() == "TRUE"): showResult=True elif (lineList[1].upper() == "OFF") or (lineList[1].upper() == "0") or (lineList[1].upper() == "FALSE"): showResult=False else: print ("Unrecognized parameter %s for 'R' command"%lineList[1]) else: showResult = not showResult print ("Show results mode is now %s"%(("OFF","ON")[showResult])) # elif (len(line) > len("help")) and (line[:len("help")]=='help'): # elif (len(line) > len("help")) and (line[:len("help")]=='help'): elif lineList[0] == 'help': elif lineList[0] == 'help': # helpFilter=line[len('help'):].strip() # helpFilter=line[len('help'):].strip() Loading Loading @@ -431,6 +446,7 @@ USAGE else: else: cmdLine=line.split() cmdLine=line.split() rslt= execTask(cmdLine) rslt= execTask(cmdLine) if showResult: print (' Result: '+hx(rslt)) print (' Result: '+hx(rslt)) #http://stackoverflow.com/questions/11781265/python-using-getattr-to-call-function-with-variable-parameters #http://stackoverflow.com/questions/11781265/python-using-getattr-to-call-function-with-variable-parameters #*getattr(foo,bar)(*params) #*getattr(foo,bar)(*params) Loading
py393/verilog_utils.py +30 −4 Original line number Original line Diff line number Diff line Loading @@ -127,9 +127,9 @@ def hexMultiple(data): subResult=[] subResult=[] for subItem in item: for subItem in item: try: try: rslt.append("0x%x"%subItem) subResult.append("0x%x"%subItem) except: except: rslt.append(str(subItem)) subResult.append(str(subItem)) rslt.append(subResult) rslt.append(subResult) else: else: try: try: Loading @@ -144,3 +144,29 @@ def hexMultiple(data): rslt = str(item) rslt = str(item) return rslt return rslt def checkIntArgs(names,var_dict): for name in names: try: v=var_dict[name] except: raise Exception("ERROR: '%s' is not among %s"%(name,str(var_dict.keys()))) if not isinstance(v,int): print ("Expected an integer for '%s', got '%s"%(name,v)) try: d=int(v,16) print ("Did you mean 0x%x ?"%d) except: pass raise Exception("Not a number for '%s' : '%s'"%(name,v)) def smooth2d(arr2d): smooth=[] l=len(arr2d)-1 for i in range(l+1): im=(0,i-1)[i>0] ip=(l,i+1)[i<l] row=[] for j in range(len(arr2d[i])): row.append(0.5*arr2d[i][j]+0.25*(arr2d[ip][j]+arr2d[im][j])) smooth.append(row) return smooth No newline at end of file