BSV by Example - UCSD CSE [PDF]

8.1.1 Up-down counter with simultaneous up/down commands . . . . . . . . . . . 82. 8.1.2 Attributes (*fire ... 117. 12 E

123 downloads 39 Views 1MB Size

Recommend Stories


Psychological Science - UCSD Psychology [PDF]
Jun 4, 2010 - On behalf of: Association for Psychological Science can be found at: ..... the probabilities are as follows: P(species a|yellow eye) = 1, P(species b|black eye) = 8/13, P(species a|light-green claw) = 7/8, and P(species b|dark-green cla

[PDF] Angular 2 By Example
In the end only three things matter: how much you loved, how gently you lived, and how gracefully you

Read PDF Learning by Example
Those who bring sunshine to the lives of others cannot keep it from themselves. J. M. Barrie

PDF Angular 2 By Example
The beauty of a living thing is not the atoms that go into it, but the way those atoms are put together.

PDF Econometrics by Example Audiobooks
We may have all come on different ships, but we're in the same boat now. M.L.King

by example
Your task is not to seek for love, but merely to seek and find all the barriers within yourself that

bsv-medisafe
The happiest people don't have the best of everything, they just make the best of everything. Anony

OpenCV Android Programming By Example Pdf
Don't watch the clock, do what it does. Keep Going. Sam Levenson

PdF Download Learning SAS by Example
I cannot do all the good that the world needs, but the world needs all the good that I can do. Jana

PdF Download Learning SAS by Example
You can never cross the ocean unless you have the courage to lose sight of the shore. Andrè Gide

Idea Transcript


BSV by Example The next-generation language for electronic system design

Rishiyur S. Nikhil and Kathy Czeck Revision: November 3, 2010 c 2010 Bluespec, Inc. All rights reserved. Copyright

1

Contents Table of Contents

2

1 Introduction

9

1.1

Design activities where BSV is used . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

1.2

Key ideas in BSV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

1.2.1

Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

1.2.2

Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

1.3

Why BSV? Can’t we do all this with existing languages (like C++)? . . . . . . . . .

11

1.4

About this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

2 Getting started with BSV 2.1

2.2

2.3

2.4

15

A simple example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

2.1.1

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

2.1.2

Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

2.1.3

(* synthesize *) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

2.1.4

Module definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

2.1.5

Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

2.1.6

System tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

Building the design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

2.2.1

Bluespec Development Workstation (BDW) . . . . . . . . . . . . . . . . . . .

17

2.2.2

Components of a BSV design . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

2.2.3

Overview of the BSV build process . . . . . . . . . . . . . . . . . . . . . . . .

18

2.2.4

Create a project file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

2.2.5

Compile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

Multiple modules in a single package . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

2.3.1

21

Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Multiple packages in a single design

. . . . . . . . . . . . . . . . . . . . . . . . . . .

3 Tb.bsv", line 34, column 11: (P0040) Use of ’a’ without assignment

The variable on the right-hand side is now meaningless. Since a has not been initialized or assigned, it does not represent any combinational circuit, and so the expression a*a is meaningless.

5 5.1

Rules, registers, and fifos Defining and updating a register

Source directory: rulesregs/register Source listing: Appendix A.4.1 In this section we discuss the most basic state element, the register, and how to use registers to store values. We’ll also examine rules and how they are used to describe state transitions. This example defines a register containing int values; the name of the register is x: 38

package Tb; (* synthesize *) module mkTb (Empty); Reg#(int) x

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.