Bug 26 - pinmux default mux values
Summary: pinmux default mux values
Status: IN_PROGRESS
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Specification (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- enhancement
Assignee: Luke Kenneth Casson Leighton
URL:
Depends on:
Blocks: 8
  Show dependency treegraph
 
Reported: 2018-07-30 13:24 BST by Luke Kenneth Casson Leighton
Modified: 2019-04-15 12:26 BST (History)
1 user (show)

See Also:
NLnet milestone: ---
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation:
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kenneth Casson Leighton 2018-07-30 13:24:56 BST
BSV auto-gen from spec

also multiple maps, selectable via an external pin at boot time (not to be put onto the pinmux!!!)
Comment 1 Luke Kenneth Casson Leighton 2018-08-03 06:28:59 BST
src/bsv/peripheral_gen/gpio.py:

    def mkslow_peripheral(self, size=0):
        print "gpioslow", self.peripheral, dir(self.peripheral)
        size = len(self.peripheral.pinspecs)
        dflt = "%s" % ("0"*size*2) # XX TODO: read default from config
        return "MUX#(%d) mux{0} <- mkmux(`b%s);\n" % (size, dflt)+ \
               "GPIO#(%d) gpio{0} <- mkgpio();" % size

src/spec/microtest.py:

    config = {'muxdefaults': {'A': '001010' # binary (2-bit)?
                             }
             }
    ps = PinSpec(pinbanks, fixedpins, function_names, config)

maybe there are better ways to spec this, e.g. pass in a dictionary of muxer defaults {"A": {0: 0b01, 5: 0b10 } } which are turned into the binary string, later?