예제 #1
0
    def route_supplies(self):
        """ Route the supply grid and connect the pins to them. """

        # Copy the pins to the top level
        # This will either be used to route or left unconnected.
        for inst in self.insts:
            self.copy_power_pins(inst, "vdd")
            self.copy_power_pins(inst, "gnd")

        if not OPTS.route_supplies:
            # Do not route the power supply (leave as must-connect pins)
            return

        grid_stack = set()
        try:
            from tech import power_grid
            grid_stack = power_grid
        except ImportError:
            # if no power_grid is specified by tech we use sensible defaults
            import tech
            if "m4" in tech.layer:
                # Route a M3/M4 grid
                grid_stack = self.m3_stack
            elif "m3" in tech.layer:
                grid_stack = ("m3", )

        from supply_grid_router import supply_grid_router as router
        rtr = router(grid_stack, self)
        rtr.route()
예제 #2
0
    def route_supplies(self):
        """ Route the supply grid and connect the pins to them. """

        # Copy the pins to the top level
        # This will either be used to route or left unconnected.
        for inst in self.insts:
            self.copy_power_pins(inst,"vdd")
            self.copy_power_pins(inst,"gnd")
            
        import tech
        if not OPTS.route_supplies:
            # Do not route the power supply (leave as must-connect pins)
            return
        elif "metal4" in tech.layer:
            # Route a M3/M4 grid
            from supply_grid_router import supply_grid_router as router
            rtr=router(("metal3","via3","metal4"), self)
        elif "metal3" in tech.layer:
            from supply_tree_router import supply_tree_router as router
            rtr=router(("metal3",), self)

        rtr.route()
예제 #3
0
    def route_supplies(self):
        """ Route the supply grid and connect the pins to them. """

        # Copy the pins to the top level
        # This will either be used to route or left unconnected.
        for pin_name in ["vdd", "gnd"]:
            for inst in self.insts:
                self.copy_power_pins(inst, pin_name)

        if not OPTS.route_supplies:
            # Do not route the power supply (leave as must-connect pins)
            return

        try:
            from tech import power_grid
            grid_stack = power_grid
        except ImportError:
            # if no power_grid is specified by tech we use sensible defaults
            # Route a M3/M4 grid
            grid_stack = self.m3_stack

        if OPTS.route_supplies == "grid":
            from supply_grid_router import supply_grid_router as router
        elif OPTS.route_supplies:
            from supply_tree_router import supply_tree_router as router
            
        rtr=router(grid_stack, self)
        rtr.route()

        # Find the lowest leftest pin for vdd and gnd
        for pin_name in ["vdd", "gnd"]:
            # Copy the pin shape to rectangles
            for pin in self.get_pins(pin_name):
                self.add_rect(pin.layer,
                              pin.ll(),
                              pin.width(),
                              pin.height())
            # Remove the pins
            self.remove_layout_pin(pin_name)

            pin = rtr.get_pin(pin_name)
            
            self.add_layout_pin(pin_name,
                                pin.layer,
                                pin.ll(),
                                pin.width(),
                                pin.height())
예제 #4
0
    def route_escape_pins(self):
        """
        Add the top-level pins for a single bank SRAM with control.
        """

        # List of pin to new pin name
        pins_to_route = []
        for port in self.all_ports:
            # Connect the control pins as inputs
            for signal in self.control_logic_inputs[port]:
                if signal.startswith("rbl"):
                    continue
                if signal=="clk":
                    pins_to_route.append("{0}{1}".format(signal, port))
                else:
                    pins_to_route.append("{0}{1}".format(signal, port))
                    
            if port in self.write_ports:
                for bit in range(self.word_size + self.num_spare_cols):
                    pins_to_route.append("din{0}[{1}]".format(port, bit))

            if port in self.readwrite_ports or port in self.read_ports:
                for bit in range(self.word_size + self.num_spare_cols):
                    pins_to_route.append("dout{0}[{1}]".format(port, bit))

            for bit in range(self.col_addr_size):
                pins_to_route.append("addr{0}[{1}]".format(port, bit))

            for bit in range(self.row_addr_size):
                pins_to_route.append("addr{0}[{1}]".format(port, bit + self.col_addr_size))

            if port in self.write_ports:
                if self.write_size:
                    for bit in range(self.num_wmasks):
                        pins_to_route.append("wmask{0}[{1}]".format(port, bit))

            if port in self.write_ports:
                for bit in range(self.num_spare_cols):
                    pins_to_route.append("spare_wen{0}[{1}]".format(port, bit))

        from signal_escape_router import signal_escape_router as router
        rtr=router(self.m3_stack, self)
        rtr.escape_route(pins_to_route)