Skip to content

Commit 2a829bf

Browse files
committed
Fixes regarding Pull Request comments.
1 parent fd31d82 commit 2a829bf

File tree

6 files changed

+17
-19
lines changed

6 files changed

+17
-19
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ For the executable there are three general arguments: `-h,--help`, `-H,--help-al
213213

214214
Unless neither of the three arguments is used, first argument is the mode which the executable has to function in. Currently there are only two available modes: `hls` and `sim`.
215215

216-
`hls` mode is used to translate the provided DFCxx kernel to different output formats. The list of arguments for `hls`-mode is presented below:
216+
`hls` mode is used to perform the high-level synthesis of digital hardware description from the input DFCxx kernel. The list of arguments for `hls`-mode is presented below:
217217

218218
* `-h,--help`: *optional* flag; used to print the help-message about other arguments.
219219
* `--config <PATH>`: *required* filesystem-path option; used to specify the file for a JSON latency configuration file. Its format is presented in `docs/latency_config.md`.
@@ -232,7 +232,7 @@ Here is an example of an Utopia HLS CLI call:
232232
umain hls --config ~/utopia-user/config.json --out-sv ~/outFile.sv --out-dfcir ~/outFile2.mlir -a
233233
```
234234

235-
`sim` mode is used to simulate the provided DFCxx kernel. The list of arguments for `sim`-mode is presented below:
235+
`sim` mode is used to simulate the input DFCxx kernel. The list of arguments for `sim`-mode is presented below:
236236

237237
* `-h,--help`: *optional* flag; used to print the help-message about other arguments.
238238
* `--in <PATH>`: *optional* filesystem-path option; used to specify the input file for simulation data (default: `sim.txt`). Its format is presented in `docs/simulation.md`.

docs/latency_config.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## JSON Configuration
22

3-
Latency configuration for each computational operation (number of pipeline stages) used in a DFCxx kernel is provided via a JSON file.
3+
Latency configuration (in terms of pipeline stages) for each computational operation used in a DFCxx kernel is provided via a JSON file.
44

5-
Currently each operation has two specifications: for integer values (`INT`) and floating point (`FLOAT`) values.
5+
Currently each operation has two specifications based on the types of its arguments: for integer values (`INT`) and floating point (`FLOAT`) values respectively.
66

7-
The list of all computational operations is provided below:
7+
All the supported computational operations are listed below:
88

99
* `ADD` - Addition
1010
* `SUB` - Subtraction
@@ -22,7 +22,7 @@ The list of all computational operations is provided below:
2222
* `EQ` - "equal" comparison
2323
* `NEQ` - "not equal" comparison
2424

25-
JSON configuration structure states that for every operation with a specific configuration (each pair is represented as a separate JSON-field with `_` between pair's elements) present in the kernel, operation's latency will be provided.
25+
JSON configuration structure states that for every operation with a specific configuration (each pair is represented as a separate JSON-field with `_` between pair's elements) present in the kernel, operation's latency has to be provided.
2626

2727
Here is an example of a JSON configuration file, containing latencies for multiplication, addition and subtraction of integer numbers:
2828

docs/simulation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ DFCxx kernels can be simulated to check that they describe computations as expec
77
The format to provide simulation input data is the following:
88

99
* input data is divided into blocks separated with a newline character (`\n`) - one block for each simulation step
10-
* every block has a number of lines, each of which has the name of some **input** stream/scalar value and its hex-value (these values do not have an explicit type - they will be casted to the types of related computational nodes)
10+
* every block has a number of lines, each of which has the case-sensitive name of some **input** stream/scalar variable and its hex-value (these values do not have an explicit type - they will be casted to the types of related computational nodes)
1111
* stream/scalar value name and the hex-value are separated with a single space character (` `)
1212
* the provided value must be a valid hex-value: with or without `0x`, with either lower- or uppercase letters
1313
* if some stream/scalar hex-value is present twice or more in the same block - its latest described value is used
1414

15-
Here is an example of an input simulation file for `MuxMul` kernel, which has two input streams `x` (unsigned 32-bit integer values) and `ctrl` (unsigned 1-bit integer values -> boolean values).
15+
Here is an example of an input simulation file for `MuxMul` kernel, which has two input streams: `x` (unsigned 32-bit integer values) and `ctrl` (unsigned 1-bit integer values).
1616

1717
```txt
1818
x 0x32

src/model/dfcxx/include/dfcxx/vars/var.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class DFVariableImpl {
2323
friend VarBuilder;
2424

2525
public:
26-
enum IODirection{
26+
enum IODirection {
2727
NONE = 0,
2828
INPUT,
2929
OUTPUT

src/model/dfcxx/lib/dfcxx/graph.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@ const std::unordered_set<Node> &Graph::getStartNodes() const {
2020
return startNodes;
2121
}
2222

23-
const std::unordered_map<Node,
24-
std::vector<Channel>> &Graph::getInputs() const {
23+
const std::unordered_map<Node, std::vector<Channel>> &Graph::getInputs() const {
2524
return inputs;
2625
}
2726

28-
const std::unordered_map<Node,
29-
std::vector<Channel>> &Graph::getOutputs() const {
27+
const std::unordered_map<Node, std::vector<Channel>> &Graph::getOutputs() const {
3028
return outputs;
3129
}
3230

src/model/dfcxx/lib/dfcxx/simulator.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,12 @@ static inline std::string valueToBinary(SimValue value, uint64_t width) {
261261
return stream.str();
262262
}
263263

264-
void DFCXXSimulator::writeOutput(ctemplate::TemplateDictionary *dict,
265-
const RecordedValues &vals,
266-
uint64_t startInd,
267-
uint64_t iter,
268-
const std::unordered_map<Node,
269-
std::string> &idMap) {
264+
void
265+
DFCXXSimulator::writeOutput(ctemplate::TemplateDictionary *dict,
266+
const RecordedValues &vals,
267+
uint64_t startInd,
268+
uint64_t iter,
269+
const std::unordered_map<Node, std::string> &idMap) {
270270
ctemplate::TemplateDictionary *tick =
271271
dict->AddSectionDictionary("TICKS");
272272
tick->SetValue("TICK", std::to_string(startInd + iter));

0 commit comments

Comments
 (0)