-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.3 Streaming I/O code in the manual- iprintf and while (1) loop issues #245
Comments
Could you provide the adf and source code you are using to better try to reproduce the issue? |
|
This the actual source code from 3.3 Streaming I/O section of the manual. int main() |
I checked the docx examples. Here's some comments: Case 1: Cases 2-4: |
The adf file is shared here: With the following code, the stream in data is properly copied in the stream out: But in the following code, with addition operation, the stream out provides random output: Why does it happen the arithmetic operation is done inside while (1) loop, the stream out provides random output? |
You most likely need to write some parser into the C-code that reads one line (separated by '\n') of your input file and combines the characters into an integer, strtol looks like a good place to start. |
Streaming_issues.docx
I copied the stdout.adf and added stream_in_stream_in_status stream_out_stream_out_status. Both stream_in and stream_out are important to print out the mathematical operation without using iprintf so that an efficient processor with a smaller number of cycles can be made.
But I am getting unusual results in stream_out and TTA simulator when I am doing any mathematical operation (add, subtract, mult, division) inside the “while (1)” loop.
Also, when I am using ‘iprintf’ to print the results with a for loop, the processor behaves differently and prints unusual digits.
I don’t want to design a processor that can print. But without iprintf, tcecc optimizes the code.
I have added some screenshots in the doc file.
The text was updated successfully, but these errors were encountered: