google / google/xls

Create new package when converting to blocks

Open
#555 1 comment 0 reactions 0 assignees View on GitHub
codegen
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

Currently converting procs/functions to blocks for codegen creates the new block(s) in the existing package. It might be better if the new blocks were constructed in a new package. Few reasons:

1. The proc/function is no longer necessary for codegen so it just clutters the package with unnecessary garbage. Deleting the proc/function is a possibility, but even better would be to leave the input code to the block conversion unchanged.
2. Prevent name collisions between blocks and procs/functions. Right now they are allowed to have the same name .
3. Prevent channel name collision. We probably need a new kind of channel which encapsulates the data/ready/valid ports of the block. See https://github.com/google/xls/issues/554. Ideally this new channel type would have the same name as the channel it came from.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.