dawsonjon/Chips-2.zero

Partager

news image

https://travis-ci.org/dawsonjon/Chips-2.zero.svg?branch=grasp
https://readthedocs.org/projects/chips-20/badge/?version=most up-to-date

Chips – 2.zero

Chips is a high stage, FPGA form instrument inspired by Python.

Are trying it out

Why not attempt the Chips net app.

Function parts in C, form FPGAs in Python

In Chips, a form resembles a community of computer systems utilized in a single
chip. A chip contains many interconnected parts operating in parallel.
Each and each ingredient acts love a computer operating a C program.

Parts be in contact with every other sending messages all the draw thru buses. The
form of a chip – the parts and the connections between them – is carried
in Python.

Chips attain in three parts:

  1. A Python library to construct and simulate chips by connecting collectively digital parts the usage of high proceed buses.
  2. A series of though-provoking made digital parts.
  3. A C-to-hardware compiler to fabricate fresh digital parts within the C programming language.

A temporary instance

from chips.api.api import *

#make a fresh chip
chip = Chip("knight_rider")

#elaborate a ingredient in C
scanner = Narrate(C_file = """

    /* Knight Rider */
    int leds = output("leds");
    void predominant(){
        unsigned shifter = 1;
        while(1){
            while(shifter != 0x80){
                fputc(shifter, leds);
                shifter <<= 1;
                wait_clocks(5000000);
            }
            while(shifter != 0x01){
                fputc(shifter, leds);
                shifter >>= 1;
                wait_clocks(5000000);
            }
        }
    }

""", inline=Precise)

#decide simulation output in Python
scanner_output = Response(chip, "scanner", "int")

#add scanner to chip and fasten
scanner(chip, inputs = {}, outputs = {"leds":scanner_output})

#generate synthesisable verilog code
chip.generate_verilog()

#bustle simulation in Python
chip.simulation_reset()
while len(scanner_output) < sixteen:
    chip.simulation_step()

#test the outcomes
print checklist(scanner_output)

Work at a higher stage of abstraction

In Chips, the particulars of gates, clocks, resets, finite-issue machines and
float-adjust are dealt with by the instrument, this leaves the clothier free to think
about the architecture and the algorithms. This has some advantages:

  • Designs are more efficient.
  • Much less advanced designs decide much less time to earn working.
  • Much less advanced designs are much less possible to possess bugs.

With Chips the batteries are integrated

With used Hardware Description Languages, there are hundreds restrictions on
what is going to even be translated into hardware and utilized in a chip.

With Chips simply about all genuine code might perhaps even be translated into hardware. This involves
division, single and double precision IEEE floating point, maths functions,
trig-functions, timed waits, pseudo-random numbers and recursive characteristic
calls.

Python is a wealthy verification atmosphere

Chips provides the ability to simulate designs natively in Python. Python is
an incredible programming language with extensive libraries retaining many
application domains. This makes it the supreme atmosphere to test a chip.

NumPy , SciPy and
MatPlotLib can be of curiosity to
engineers, nevertheless that's lawful the birth .

Below the hood

At the advantage of the scenes, Chips uses some contemporary methods to generate compact and
efficient common sense - a hybrid of machine and hardware.

No longer most though-provoking does the compiler translate the C code into CPU directions, it also
generates a personalized pipelined RISC CPU on the cruise. The CPU provides the
optimum instruction field for any particular C program.

By minimising the common sense required to develop every concurrent job, designers can
slit power and residence or price. Performance features might perhaps even be completed by rising
the need of concurrent projects in a single tool (tens in a tiny tool to
around a thousand or more tremendous tool).

While the code generated by chips is compact and efficient, die not easy FPGA
designers can be chuffed to clutch that they are going to mute hand craft efficiency
serious recordsdata paths within the event that they possess to. There are even a pair of hand crafted
parts thrown in!

Install from github

$ git clone --recursive https://github.com/dawsonjon/Chips-2.zero.git
$ cd Chips-2.zero
$ sudo python setup set up

Install from PyPi

$ pip-set up chips

Read More

(Visité 1 fois, 1 aujourd'hui)

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *