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

Polymorphic Memory #83

Open
phanrahan opened this issue Aug 1, 2019 · 6 comments
Open

Polymorphic Memory #83

phanrahan opened this issue Aug 1, 2019 · 6 comments

Comments

@phanrahan
Copy link
Collaborator

phanrahan commented Aug 1, 2019

Now that I am implementing real processors with a von Neumann memory architecture, I am running into a problem with the type associated with memory.

Currently, a memory instance is created with a call like:

self.mem = ROM(Inst, MAX_MEMORY, mem, Word(0))

where

mem = [asm.add(0,1,2), Word(3)]

which means initialize mem[0] with an Inst and mem[1] with a Word(0) and the rest of memory with Word(0).

This works but is fragile. Any suggestions on how to handle this?

#20

@rdaly525
Copy link
Collaborator

rdaly525 commented Aug 1, 2019

Pat, I modified the memory to make it less fragile from #80 . In general for the paper we are referring to the branch 'paper'. This is where we have been doing all the dev work.

@rdaly525
Copy link
Collaborator

This should probably be resolved with the new assembledADT types. I think constructing an ADT value with a bitvector should work now.

@cdonovick
Copy link
Owner

Can we close this issue?

@rdaly525
Copy link
Collaborator

I think Pat's issue can easily be resolved by just specifying the instruction type to be the assembledADT type upfront.

@cdonovick
Copy link
Owner

@rdaly525 I'm not sure what declaring an instruction to be an 'assembledADT' means.

@phanrahan
Copy link
Collaborator Author

I will test this again and provide a simple example if it fails.

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

3 participants