Go2async
High-level synthesis tool for asynchronous circuits
Install / Use
/learn @SeWiede/Go2asyncREADME
go2async
The executable of this project generates vhdl code of an asynchronous circuit derived from a go function.
This project is in its very early stages and underwent few practical tests.
Usage
Main go file is in cmd/
To generate an async circuit run: go run go2async.go <generate|gen|g> <go file> [outfile]
A single .go file with only a package name and at least one function is accepted. The function has to contain at least one parameter, one statement and exactly one return statement at the end. There are some examples in example/goexamples/
The resulting .vhd and the provided third_party/vhd/entities.vhd in are needed for a quartus project. To test the circuit you have to instantiate a 'Scope' entity which the function name as architecture name. Set the ports as follows:
[name:] entity work.Scope(<function name>)
generic map(
DATA_OUT_WIDTH => <function name>_OUT_DATA_WIDTH,
DATA_IN_WIDTH => <function name>_IN_DATA_WIDTH
)
port map (
rst => <reset pin>,
-- Input channel
in_req => <in pin>,
in_ack => <out pin>,
in_data => <parameters in a vector>,
-- Output channel
out_ack => <in pin>
out_req => <out pin>,
out_data => <return values in a vector>,
);
A full example adjusted for the terasic DE0-CV board can be found in example/vhd. Don't forget to include third_party/vhd/entities.vhd and third_party/vhd/delay_element.vhd in your project.
Note
- Uints and ints are downsized to 4-bit values (use u/int8, 16, etc. for bigger variables)
- int/uint can be resized with --intSize <number>
- the used delays are purely estimated with few practical tests
References
Most of third_party/vhd/entities.vhd comes directly or derived from (BSD-2 licensed): https://github.com/zuzkajelcicova/Async-Click-Library Thank you!
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
