2019-04-26 12:21:50 -07:00
|
|
|
# See LICENSE for licensing information.
|
|
|
|
|
#
|
2024-01-03 14:32:44 -08:00
|
|
|
# Copyright (c) 2016-2024 Regents of the University of California and The Board
|
2019-06-14 08:43:41 -07:00
|
|
|
# of Regents for the Oklahoma Agricultural and Mechanical College
|
|
|
|
|
# (acting for and on behalf of Oklahoma State University)
|
|
|
|
|
# All rights reserved.
|
2019-04-26 12:21:50 -07:00
|
|
|
#
|
2022-11-27 13:01:20 -08:00
|
|
|
from openram import OPTS
|
2022-07-13 10:57:56 -07:00
|
|
|
from .hierarchical_predecode import hierarchical_predecode
|
2016-11-08 09:57:35 -08:00
|
|
|
|
2020-05-14 11:20:37 -07:00
|
|
|
|
2016-11-08 09:57:35 -08:00
|
|
|
class hierarchical_predecode3x8(hierarchical_predecode):
|
|
|
|
|
"""
|
|
|
|
|
Pre 3x8 decoder used in hierarchical_decoder.
|
|
|
|
|
"""
|
2021-03-08 14:40:36 -08:00
|
|
|
def __init__(self, name, column_decoder=False, height=None):
|
|
|
|
|
super().__init__(name, 3, column_decoder, height)
|
2016-11-08 09:57:35 -08:00
|
|
|
|
2018-08-27 10:42:40 -07:00
|
|
|
self.create_netlist()
|
2020-03-06 13:26:40 -08:00
|
|
|
if not OPTS.netlist_only:
|
2018-08-27 16:42:48 -07:00
|
|
|
self.create_layout()
|
2016-11-08 09:57:35 -08:00
|
|
|
|
2018-08-27 10:42:40 -07:00
|
|
|
def create_netlist(self):
|
2018-08-27 16:42:48 -07:00
|
|
|
self.add_pins()
|
2018-11-13 16:05:22 -08:00
|
|
|
self.add_modules()
|
2018-08-27 10:42:40 -07:00
|
|
|
self.create_input_inverters()
|
2020-03-06 13:26:40 -08:00
|
|
|
connections=[["inbar_0", "inbar_1", "inbar_2", "out_0", "vdd", "gnd"],
|
2020-11-03 06:29:17 -08:00
|
|
|
["in_0", "inbar_1", "inbar_2", "out_1", "vdd", "gnd"],
|
2020-03-06 13:26:40 -08:00
|
|
|
["inbar_0", "in_1", "inbar_2", "out_2", "vdd", "gnd"],
|
2020-11-03 06:29:17 -08:00
|
|
|
["in_0", "in_1", "inbar_2", "out_3", "vdd", "gnd"],
|
2020-03-06 13:26:40 -08:00
|
|
|
["inbar_0", "inbar_1", "in_2", "out_4", "vdd", "gnd"],
|
|
|
|
|
["in_0", "inbar_1", "in_2", "out_5", "vdd", "gnd"],
|
|
|
|
|
["inbar_0", "in_1", "in_2", "out_6", "vdd", "gnd"],
|
|
|
|
|
["in_0", "in_1", "in_2", "out_7", "vdd", "gnd"]]
|
|
|
|
|
self.create_and_array(connections)
|
2016-11-08 09:57:35 -08:00
|
|
|
|
2020-03-06 13:26:40 -08:00
|
|
|
def get_and_input_line_combination(self):
|
2017-08-23 15:02:15 -07:00
|
|
|
""" These are the decoder connections of the NAND gates to the A,B,C pins """
|
2018-10-11 09:53:08 -07:00
|
|
|
combination = [["Abar_0", "Abar_1", "Abar_2"],
|
|
|
|
|
["A_0", "Abar_1", "Abar_2"],
|
|
|
|
|
["Abar_0", "A_1", "Abar_2"],
|
|
|
|
|
["A_0", "A_1", "Abar_2"],
|
2020-03-06 13:26:40 -08:00
|
|
|
["Abar_0", "Abar_1", "A_2"],
|
2020-11-03 06:29:17 -08:00
|
|
|
["A_0", "Abar_1", "A_2"],
|
|
|
|
|
["Abar_0", "A_1", "A_2"],
|
2018-10-11 09:53:08 -07:00
|
|
|
["A_0", "A_1", "A_2"]]
|
2020-03-06 13:26:40 -08:00
|
|
|
return combination
|