Coder Social home page Coder Social logo

lpcperipheral's Introduction

LPC Peripheral Overview

This is an LPC peripheral that implements LPC IO and FW cycles so that it can boot a host like a POWER9. This peripheral would typically sit inside a BMC SoC.

It implements the Intel Low Pin Count (LPC) spec from here.

System diagram

                              .
                              .
  LPC       LPC Clock         .       System Clock
  pins                        .                        LPC FW               DMA
        +---------+     +------------+     +--------+ Wishbone +--------+ Wishbone
        |         |     |   ASYNC    |     |        |          |  LPC   |  Master
  LCLK  |         +---->|  FIFO WR   +---->|        +--------->|  CTRL  +-------->
------->|   LPC   |     |            |     |        |          |        |
        |  Front  |     +------------+     | LOGIC  |          +--------+
 LFRAME |         |           .            |        |
------->|         |     +------------+     |        |          +--------+
        |         |     |   ASYNC    |     |        |          | IPMI BT|
  LAD   |         |<----+  FIFO RD   |<----+        +--------->|  FIFO  |<--------
<------>|         |     |            |     |        |          |        |   IO
        +---------+     +------------+     +--------+  LPC IO  +--------+ Wishbone
                              .                       Wishbone |  UART  |  Slave
                              .                                |        |
                              .                                +--------+
                              .                                |  CTRL  |
                                                               |        |
                                                               +--------+

The design translates the LPC IO accesses into a wishbone master. The same is done for FW accesses.

The LPC IO wishbone master bus has devices attached to it. These include a an IPMI BT FIFO and standard 16550 UART. The back end of these can then be access by an external IO wishbone slave (which would typically come from the BMC CPU).

The LPC FW wishbone master gets translated into an external wishbone master. This translation provides an offset and mask so the external wishbone master accesses occur can be controlled. Typically this external wishbone will be hooked into a DMA path the system bus of the BMC, so where this can access needs to be controlled.

The LPC front end runs using the LPC clock. The rest of the design works on the normal system clock. Async FIFOs provide a safe boundary between the two.

HDL is written in nmigen because that's what all the cool kids are doing. This is our first nmigen project, and we are software developers, so be kind!

Building

This is designed to be integrated into some other project (like microwatt for libreBMC) not build as a standalone project.

If you want the verilog, do this to produce a lpcperipheral.v

python -m lpcperipheral.lpcperipheral

Testing

There are an extensive set of tests in tests/. To run these do:

python -m unittest

lpcperipheral's People

Contributors

mikey avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.