请输入您要查询的百科知识:

 

词条 Handel-C
释义

  1. Additional features

     Parallel programs  Channels  Scope and variable sharing  Extensions to the C language  Scheduling 

  2. History

  3. References

  4. External links

{{Infobox programming language
| name = Handel-C
| paradigm = Imperative (procedural, structured), concurrent
| logo =
| logo caption =
| year = 1996
| designer = Oxford University Computing Laboratory
| developer = ESL; Celoxica; Agility; Mentor Graphics
| latest release version = v3.0
| latest release date =
| turing-complete = Yes
| typing = Static, manifest, nominal, inferred
| implementations = Celoxica DK
| influenced_by = C, CSP, occam
| influenced =
| dialects =
| operating_system = Cross-platform (multi-platform)
| file_ext = .hcc, .hch
| website = {{URL|http://www.mentor.com/products/fpga/handel-c/}}
}}

Handel-C is a high-level programming language which targets low-level hardware, most commonly used in the programming of FPGAs. It is a rich subset of C, with non-standard extensions to control hardware instantiation with an emphasis on parallelism. Handel-C is to hardware design what the first high-level programming languages were to programming CPUs. Unlike many other design languages that target a specific architecture Handel-C can be compiled to a number of design languages and then synthesised to the corresponding hardware. This frees developers to concentrate on the programming task at hand rather than the idiosyncrasies of a specific design language and architecture.

Additional features

The subset of C includes all common C language features necessary to describe complex algorithms. Like many embedded C compilers, floating point data types were omitted. Floating point arithmetic is supported through external libraries that are very efficient.

Parallel programs

In order to facilitate a way to describe parallel behavior some of the CSP keywords are used, along with the general file structure of Occam.

For example:[1]

par {

     ++c;     a = d + e;     b = d + e;

}

Channels

Channels provide a mechanism for message passing between parallel threads. Channels can be defined as asynchronous or synchronous (with or without an inferred storage element respectively). A thread writing to a synchronous channel will be immediately blocked until the corresponding listening thread is ready to receive the message. Likewise the receiving thread will block on a read statement until the sending thread executes the next send. Thus they may be used as a means of synchronizing threads.[1]

par {

    chan int a; // declare a synchronous channel    int x;
    // begin sending thread    seq (i = 0; i < 10; i++) {        a ! i;  // send the values 0 to 9 sequentially into the channel    }
    // begin receiving thread    seq (j = 0; j < 10; j++) {        a ? x;  // perform a sequence of 10 reads from the channel into variable x        delay;  // introduce a delay of 1 clock cycle between successive reads                // this has the effect of blocking the sending thread between writes    }

}

Asynchronous channels provide a specified amount of storage for data passing through them in the form of a FIFO. Whilst this FIFO neither full nor empty, both sending and receiving threads may proceed without being blocked. However, when the FIFO is empty, the receiving thread will block at the next read. When it is full, the sending thread will block at the next send. A channel with actors in differing clock domains is automatically asynchronous due to the need for at least one element of storage to mitigate metastability.

A thread may simultaneously wait on multiple channels, synchronous or asynchronous, acting upon the first one available given a specified order of priority or optionally executing an alternate path if none is ready.

Scope and variable sharing

The scope of declarations are limited to the code blocks ({ ... }) in which they were declared, the scope is hierarchical in nature as declarations are in scope within sub blocks.[1]

For example:

int a;

void main(void)

{
   int b;   /* "a" and "b" are within scope */   {     int c;     /* "a", "b" and "c" are within scope */    }   {     int d;     /* "a", "b" and "d" are within scope */     }

}

Extensions to the C language

In addition to the effects the standard semantics of C have on the timing of the program, the following keywords[1] are reserved for describing the practicalities of the FPGA environment or for the language elements sourced from Occam:

Types and Objects Expressions Statements
chan< ... > (type clarifier)! (send into channel)
chanin[ : ] (bit range selection)? (read from channel)
chanout\\\\ (drop)delay
macro expr<- (take)ifselect
external@ (concatenation operator)set intwidth
external_divideselectlet ... ; in
inlinewidthpar
interfaceprialt
internalreleasesema
internal_divideset clock
mpramset family
macro procset part
ramset reset
romseq
sematry { ... } reset
sharedtrysema
signalwith
typeof
undefined
wom

Scheduling

In Handel-C, assignment and the delay command take one cycle. All other operations are "free".[1] This allows programmers to manually schedule tasks and create effective pipelines. By arranging loops in parallel with the correct delays, pipelines can massively increase data throughput, at the expense of increased hardware resource use.

History

The historical roots of Handel-C are in a series of Oxford University Computing Laboratory hardware description languages developed by the hardware compilation group. Handel HDL evolved into Handel-C around early 1996. The technology developed at Oxford was spun off to mature as a cornerstone product for Embedded Solutions Limited (ESL) in 1996. ESL was renamed Celoxica in September 2000.

Handel-C was adopted by many University Hardware Research groups after its release by ESL, as a result was able to establish itself as a hardware design tool of choice within the academic community, especially in the United Kingdom.

In early 2008, Celoxica's ESL business was acquired by Agility, which developed and sold, among other products, ESL tools supporting Handel-C.

In early 2009, Agility ceased operations after failing to obtain further capital investments or credit[2]

In January 2009, Mentor Graphics acquired Agility's C synthesis assets.[3]

Other subset C HDL's that developed around the same time are Transmogrifier C in 1994 at University of Toronto (now the FpgaC open source project) and Streams-C at Los Alamos National Laboratory (now licensed to Impulse Accelerated Technologies under the name Impulse C)

References

1. ^{{cite web |url=http://www.agilityds.com/literature/HandelC_Language_Reference_Manual.pdf |title=Archived copy |accessdate=2010-03-31 |deadurl=yes |archiveurl=https://web.archive.org/web/20100331015609/http://www.agilityds.com/literature/HandelC_Language_Reference_Manual.pdf |archivedate=2010-03-31 |df= }} Handel-C Language Reference Manual
2. ^{{cite web |url=http://www.eetimes.com/news/design/showArticle.jhtml?articleID=212901212|title=Agility DS victim of credit crunch|author=Gabe Moretti|date=19 January 2009|publisher=EETimes.com}}
3. ^{{cite web |url=http://www.eetimes.com/news/semi/showArticle.jhtml?articleID=212902054|title=Mentor buys Agility's C synthesis assets|author= Dylan McGrath|date=22 January 2009|publisher=EETimes.com}}

External links

  • Handel-C language resources at Mentor Graphics
  • Oxford Handel-C
{{Programmable Logic}}

2 : C programming language family|Hardware description languages

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/23 3:19:37