partial support for dedicated pins
authorNeel <neelgala@gmail.com>
Mon, 12 Mar 2018 12:32:00 +0000 (18:02 +0530)
committerNeel <neelgala@gmail.com>
Mon, 12 Mar 2018 12:32:00 +0000 (18:02 +0530)
removed unwanted print statements from scripts

pinmap.txt
src/actual_pinmux.py
src/params.py

index a6fe30d303e121ae00ac9bd41cbd26af5b73a0e3..08fc6072fe1aad5da8cd130ee20cdac5c852dd90 100644 (file)
@@ -3,3 +3,6 @@ muxed
 1      uart0_rx        spi0_mosi
 2  twi0_sda    spi0_ss
 3  twi0_scl spi0_miso
+dedicated
+4 uart1_tx
+5 uart1_rx
index 139df1c2ef160ee074c3d917c15a4ec1575a59f5..a7ff1fe2187eca514a6a3d76c8ccec48bdecaa73 100644 (file)
@@ -28,9 +28,15 @@ input_wire='''
 #########################################
 pinmux=''' '''
 pinmap_file=open("./pinmap.txt","r")
+dedicated=False
 for lineno,line in enumerate(pinmap_file):
        line1=line.split()
-       if(lineno>0):
+       if("muxed" in line):
+               dedicated=False
+       elif("dedicated" in line):
+               dedicated=True
+       ############################## Logic for muxed pins ##############################
+       if(len(line1)>1 and not(dedicated)):
                if(lineno>N_IO):
                        print("ERROR: Parameter N_IO("+str(N_IO)+") is less than the pin number in line: "+str(lineno)+" of pinmap.txt")
                        exit(1)
@@ -61,11 +67,13 @@ for lineno,line in enumerate(pinmap_file):
                                print("Error: The signal : "+str(line1[i+1])+" in lineno: "+str(lineno)+"of pinmap.txt is not present in the current dictionary.\nSoln: Either update the dictionary or fix typo.")
                                exit(1)
                        if(x=="input"):
-                               print(line1[i+1]+" "+x)
                                pinmux=pinmux+input_wire.format(line1[0],i,"wr"+line1[i+1])+"\n"
                        elif(x=="inout"):
-                               print(line1[i+1]+" "+x)
                                pinmux=pinmux+input_wire.format(line1[0],i,"wr"+line1[i+1]+"_in")+"\n"
                ################################################################################
+
+       ############################## Logic for dedicated pins ##############################
+       elif(len(line1)>1 and dedicated):
+               pinmux=pinmux+"         cell"+str(line1[0])+"_out="+line1[1]+"_io;\n"
 ###########################################
 
index 7257f00fa34d1e9743765cf49c8aca72e9441e7f..d77a53377eb6970a1ca1c896fa4acb2180aecbb8 100644 (file)
@@ -1,6 +1,6 @@
 #== Parameters ==#
 N_MUX=1                # number of selection lines for the mux per io
-N_IO=4
+N_IO=6
 N_UART=2
 N_SPI=1
 N_TWI=1