Skip to content
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

clarification on I/O ops #1

Open
6293 opened this issue Mar 13, 2022 · 2 comments
Open

clarification on I/O ops #1

6293 opened this issue Mar 13, 2022 · 2 comments

Comments

@6293
Copy link
Contributor

6293 commented Mar 13, 2022

hi @dr-orlovsky, I have some questions on I/O operations

https://github.com/pandoracore/alure/blob/3a98a1f85699409333040f0c93775e96e8d3eb00/src/isa.rs#L12

I could not find docs on AluReOp and I am assuming like this: Read and Store is for input, and Check and Load is for output. So read on assembly would be split into 2 operations, which are Read and Store. thus

read a16[2], $cycle_limit

would be converted to

Read(<some u16 value representing internal ID for $cycle_limit>)
StoreA(RegA::A16, Reg16::Reg2, u8)

In this scenario, however, I am not sure what is 3rd argument u8 for. Could you tell me brief explanations on these ops?

https://github.com/pandoracore/alure/blob/3a98a1f85699409333040f0c93775e96e8d3eb00/src/isa.rs#L20

Unlike RegA, RegR and RegF, RegS is internally u4 which stands for register index. So specifying index in 2nd argument Reg16 would not make sense.

@dr-orlovsky
Copy link
Member

Sorry I need a bit more time to recall and revisit my own notes on the topic

@dr-orlovsky
Copy link
Member

The idea is that AluRE when runs a program uses data from "dynamic data segment" for input purposes. These commands work with this segment.

Dynamic data specifies which type of data can be taken from user (their format etc).
image

image

image

All the instructions in AluReOp should be related to the input only. Output is made just by printing out values of registers after code execution basing on information in the package file. And I can't recall why I designed these operations like that, so feel free to restructure them the way you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants