opensocsysarch / CoreGenPortal

OpenSoC System Architect CoreGen Portal Graphical User Interface
http://www.systemarchitect.tech/
Apache License 2.0
1 stars 0 forks source link

Complete Add Cache Functionality #82

Closed fconlon closed 5 years ago

fconlon commented 5 years ago

Criteria 1

Given:

When:

Then:

fconlon commented 5 years ago

@jleidel now that I've completed all the edit window functionality I can do all of these adds really fast with the insert/delete functions in the backend (need the delete in the even the user hits save with invalid info), but the delete functions are private. Would it be fine to elevate them to public?

jleidel commented 5 years ago

@jleidel now that I've completed all the edit window functionality I can do all of these adds really fast with the insert/delete functions in the backend (need the delete in the even the user hits save with invalid info), but the delete functions are private. Would it be fine to elevate them to public?

You should use the DeleteNode(CoreGenNode *N) function which is exposed to publicly. This function takes a pointer to a base CoreGenNode object, decodes it for its respective type and deletes it. The process of deletion also includes cleaning up any necessary dangling links in adjacent nodes.

So, for example: CoreGenCache *Cache = CG->InsertCache("NAME", 2, 8 ); CG->DeleteNode(static_cast<CoreGenNode *>(Cache));

fconlon commented 5 years ago

This actually Makes things even easier. I'm not sure how I missed this function last night. I did prototype it out this morning before I left for work and, with everything already set up in the edit windows, I can add each piece of add functionality with 1 line of code. This delete also means I can just have one delete at the end instead of a different one for each type of node. I'm glad I asked before I ran off into the deep blue yonder. My merge request was approved late yesterday and I'm back in the office this morning so I won't be able to work on this until I get home tonight. It shouldn't take took long to add and test each add node and then I'll focus on getting the Instruction Format drawn and work on plugins. Is there a sample yaml with a plugin already in it?