{"action":"created","comment":{"url":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls/comments/28678513","id":28678513,"diff_hunk":"@@ -0,0 +1,84 @@\n+## RFG Register File Generator\n+## Copyright (C) 2014  University of Heidelberg - Computer Architecture Group\n+## \n+## This program is free software: you can redistribute it and/or modify\n+## it under the terms of the GNU Lesser General Public License as published by\n+## the Free Software Foundation, either version 3 of the License, or\n+## (at your option) any later version.\n+## \n+## This program is distributed in the hope that it will be useful,\n+## but WITHOUT ANY WARRANTY; without even the implied warranty of\n+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+## GNU General Public License for more details.\n+## \n+## You should have received a copy of the GNU General Public License\n+## along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+\n+package provide osys::rfg::generator::egenerator 1.0.0\n+package require osys::rfg\n+package require Itcl 3.4\n+package require odfi::common\n+package require odfi::list 2.0.0\n+package require odfi::files 1.0.0\n+\n+namespace eval osys::rfg::generator::egenerator {\n+\n+    itcl::class Egenerator {\n+\n+        public variable registerFile \n+\n+        constructor cRegisterFile {\n+            set registerFile $cRegisterFile\n+        }\n+\n+        public method getEnclosingRF {instance} {\n+            if {[[$instance parent] isa osys::rfg::RegisterFile]} {\n+                return [$instance parent]\n+            } else {\n+                return [getEnclosingRF {[$instance parent]}]\n+            }\n+        }\n+\n+        public method produce {destinationPath {generator \"\"}} {\n+            file mkdir $destinationPath\n+            ::puts \"eGenerator processing ${destinationPath}[$registerFile name].e\"\n+            set res [produce_RegisterFile ]\n+            odfi::files::writeToFile ${destinationPath}[$registerFile name].e $res\n+        }\n+\n+        public method produce_RegisterFile args {\n+            set out [odfi::common::newStringChannel]\n+        \n+            odfi::common::println \"<'\" $out\n+            odfi::common::println \"reg_file_def [string toupper [$registerFile name]];\" $out\n+            odfi::common::println \"\" $out\n+\n+            $registerFile walkDepthFirst {\n+                if {[$it isa osys::rfg::RamBlock]} {\n+\t    \t\t\todfi::common::println \"ram_def [string toupper [$it name]] [string toupper [[getEnclosingRF $it] name]] 0x[format %x [$it getAttributeValue software.osys::rfg::relative_address]] [$it width] [$it depth] {\" $out\n+                    odfi::common::println \"};\" $out\n+                    odfi::common::println \"\" $out\n+\t\t\t    } elseif {[$it isa osys::rfg::Register]} {\n+                    odfi::common::println \"reg_def [string toupper [$it name]] [string toupper [[getEnclosingRF $it] name]] 0x[format %x [$it getAttributeValue software.osys::rfg::relative_address]] {\" $out\n+                    $it onEachField {","path":"tcl/generator-e/eGenerator.tm","position":63,"original_position":63,"commit_id":"369aa8e4214b9b134db8d6be97ee58ca4b2bb438","original_commit_id":"369aa8e4214b9b134db8d6be97ee58ca4b2bb438","user":{"login":"TM90","id":5484864,"avatar_url":"https://avatars.githubusercontent.com/u/5484864?v=3","gravatar_id":"","url":"https://api.github.com/users/TM90","html_url":"https://github.com/TM90","followers_url":"https://api.github.com/users/TM90/followers","following_url":"https://api.github.com/users/TM90/following{/other_user}","gists_url":"https://api.github.com/users/TM90/gists{/gist_id}","starred_url":"https://api.github.com/users/TM90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TM90/subscriptions","organizations_url":"https://api.github.com/users/TM90/orgs","repos_url":"https://api.github.com/users/TM90/repos","events_url":"https://api.github.com/users/TM90/events{/privacy}","received_events_url":"https://api.github.com/users/TM90/received_events","type":"User","site_admin":false},"body":"Reserved fields will lead to naming issues\r\n\r\n    registerFile test {\r\n        register test {\r\n            field a {\r\n                width 7\r\n                software rw\r\n                hardware rw\r\n            }\r\n            reserved 1\r\n            field b {\r\n                width 7\r\n                software rw\r\n                hardware rw\r\n            }\r\n        }\r\n    }","created_at":"2015-04-20T10:37:44Z","updated_at":"2015-04-20T10:37:44Z","html_url":"https://github.com/unihd-cag/odfi-rfg/pull/42#discussion_r28678513","pull_request_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls/comments/28678513"},"html":{"href":"https://github.com/unihd-cag/odfi-rfg/pull/42#discussion_r28678513"},"pull_request":{"href":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls/42","id":33441933,"html_url":"https://github.com/unihd-cag/odfi-rfg/pull/42","diff_url":"https://github.com/unihd-cag/odfi-rfg/pull/42.diff","patch_url":"https://github.com/unihd-cag/odfi-rfg/pull/42.patch","issue_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/issues/42","number":42,"state":"open","locked":false,"title":"Iss9","user":{"login":"swittka","id":6010366,"avatar_url":"https://avatars.githubusercontent.com/u/6010366?v=3","gravatar_id":"","url":"https://api.github.com/users/swittka","html_url":"https://github.com/swittka","followers_url":"https://api.github.com/users/swittka/followers","following_url":"https://api.github.com/users/swittka/following{/other_user}","gists_url":"https://api.github.com/users/swittka/gists{/gist_id}","starred_url":"https://api.github.com/users/swittka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swittka/subscriptions","organizations_url":"https://api.github.com/users/swittka/orgs","repos_url":"https://api.github.com/users/swittka/repos","events_url":"https://api.github.com/users/swittka/events{/privacy}","received_events_url":"https://api.github.com/users/swittka/received_events","type":"User","site_admin":false},"body":"e-generator implemented. It creates the register file specific e-file, which includes the register file representation needed for the macros of RFG's software interface eVC.","created_at":"2015-04-16T11:35:43Z","updated_at":"2015-04-20T10:37:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"86be100bd26778b7464e3b82d158e65709cf9d78","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls/42/commits","review_comments_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls/42/comments","review_comment_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/issues/42/comments","statuses_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/statuses/369aa8e4214b9b134db8d6be97ee58ca4b2bb438","head":{"label":"unihd-cag:iss9","ref":"iss9","sha":"369aa8e4214b9b134db8d6be97ee58ca4b2bb438","user":{"login":"unihd-cag","id":3294497,"avatar_url":"https://avatars.githubusercontent.com/u/3294497?v=3","gravatar_id":"","url":"https://api.github.com/users/unihd-cag","html_url":"https://github.com/unihd-cag","followers_url":"https://api.github.com/users/unihd-cag/followers","following_url":"https://api.github.com/users/unihd-cag/following{/other_user}","gists_url":"https://api.github.com/users/unihd-cag/gists{/gist_id}","starred_url":"https://api.github.com/users/unihd-cag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unihd-cag/subscriptions","organizations_url":"https://api.github.com/users/unihd-cag/orgs","repos_url":"https://api.github.com/users/unihd-cag/repos","events_url":"https://api.github.com/users/unihd-cag/events{/privacy}","received_events_url":"https://api.github.com/users/unihd-cag/received_events","type":"Organization","site_admin":false},"repo":{"id":19911104,"name":"odfi-rfg","full_name":"unihd-cag/odfi-rfg","owner":{"login":"unihd-cag","id":3294497,"avatar_url":"https://avatars.githubusercontent.com/u/3294497?v=3","gravatar_id":"","url":"https://api.github.com/users/unihd-cag","html_url":"https://github.com/unihd-cag","followers_url":"https://api.github.com/users/unihd-cag/followers","following_url":"https://api.github.com/users/unihd-cag/following{/other_user}","gists_url":"https://api.github.com/users/unihd-cag/gists{/gist_id}","starred_url":"https://api.github.com/users/unihd-cag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unihd-cag/subscriptions","organizations_url":"https://api.github.com/users/unihd-cag/orgs","repos_url":"https://api.github.com/users/unihd-cag/repos","events_url":"https://api.github.com/users/unihd-cag/events{/privacy}","received_events_url":"https://api.github.com/users/unihd-cag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unihd-cag/odfi-rfg","description":"TCL based extensible Register File Generator","fork":false,"url":"https://api.github.com/repos/unihd-cag/odfi-rfg","forks_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/forks","keys_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/teams","hooks_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/hooks","issue_events_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/issues/events{/number}","events_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/events","assignees_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/assignees{/user}","branches_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/branches{/branch}","tags_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/tags","blobs_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/git/refs{/sha}","trees_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/statuses/{sha}","languages_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/languages","stargazers_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/stargazers","contributors_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/contributors","subscribers_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/subscribers","subscription_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/subscription","commits_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/commits{/sha}","git_commits_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/git/commits{/sha}","comments_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/comments{/number}","issue_comment_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/issues/comments{/number}","contents_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/contents/{+path}","compare_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/merges","archive_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/downloads","issues_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/issues{/number}","pulls_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls{/number}","milestones_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/milestones{/number}","notifications_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/labels{/name}","releases_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/releases{/id}","created_at":"2014-05-18T13:29:45Z","updated_at":"2015-04-09T08:27:39Z","pushed_at":"2015-04-16T11:35:43Z","git_url":"git://github.com/unihd-cag/odfi-rfg.git","ssh_url":"git@github.com:unihd-cag/odfi-rfg.git","clone_url":"https://github.com/unihd-cag/odfi-rfg.git","svn_url":"https://github.com/unihd-cag/odfi-rfg","homepage":"http://unihd-cag.github.io/odfi-rfg/","size":3388,"stargazers_count":0,"watchers_count":0,"language":"Tcl","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":20,"forks":0,"open_issues":20,"watchers":0,"default_branch":"master"}},"base":{"label":"unihd-cag:master","ref":"master","sha":"1611ce80434b2027979fb0c81c954e55945467b1","user":{"login":"unihd-cag","id":3294497,"avatar_url":"https://avatars.githubusercontent.com/u/3294497?v=3","gravatar_id":"","url":"https://api.github.com/users/unihd-cag","html_url":"https://github.com/unihd-cag","followers_url":"https://api.github.com/users/unihd-cag/followers","following_url":"https://api.github.com/users/unihd-cag/following{/other_user}","gists_url":"https://api.github.com/users/unihd-cag/gists{/gist_id}","starred_url":"https://api.github.com/users/unihd-cag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unihd-cag/subscriptions","organizations_url":"https://api.github.com/users/unihd-cag/orgs","repos_url":"https://api.github.com/users/unihd-cag/repos","events_url":"https://api.github.com/users/unihd-cag/events{/privacy}","received_events_url":"https://api.github.com/users/unihd-cag/received_events","type":"Organization","site_admin":false},"repo":{"id":19911104,"name":"odfi-rfg","full_name":"unihd-cag/odfi-rfg","owner":{"login":"unihd-cag","id":3294497,"avatar_url":"https://avatars.githubusercontent.com/u/3294497?v=3","gravatar_id":"","url":"https://api.github.com/users/unihd-cag","html_url":"https://github.com/unihd-cag","followers_url":"https://api.github.com/users/unihd-cag/followers","following_url":"https://api.github.com/users/unihd-cag/following{/other_user}","gists_url":"https://api.github.com/users/unihd-cag/gists{/gist_id}","starred_url":"https://api.github.com/users/unihd-cag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unihd-cag/subscriptions","organizations_url":"https://api.github.com/users/unihd-cag/orgs","repos_url":"https://api.github.com/users/unihd-cag/repos","events_url":"https://api.github.com/users/unihd-cag/events{/privacy}","received_events_url":"https://api.github.com/users/unihd-cag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unihd-cag/odfi-rfg","description":"TCL based extensible Register File Generator","fork":false,"url":"https://api.github.com/repos/unihd-cag/odfi-rfg","forks_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/forks","keys_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/teams","hooks_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/hooks","issue_events_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/issues/events{/number}","events_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/events","assignees_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/assignees{/user}","branches_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/branches{/branch}","tags_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/tags","blobs_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/git/refs{/sha}","trees_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/statuses/{sha}","languages_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/languages","stargazers_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/stargazers","contributors_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/contributors","subscribers_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/subscribers","subscription_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/subscription","commits_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/commits{/sha}","git_commits_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/git/commits{/sha}","comments_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/comments{/number}","issue_comment_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/issues/comments{/number}","contents_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/contents/{+path}","compare_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/merges","archive_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/downloads","issues_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/issues{/number}","pulls_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls{/number}","milestones_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/milestones{/number}","notifications_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/labels{/name}","releases_url":"https://api.github.com/repos/unihd-cag/odfi-rfg/releases{/id}","created_at":"2014-05-18T13:29:45Z","updated_at":"2015-04-09T08:27:39Z","pushed_at":"2015-04-16T11:35:43Z","git_url":"git://github.com/unihd-cag/odfi-rfg.git","ssh_url":"git@github.com:unihd-cag/odfi-rfg.git","clone_url":"https://github.com/unihd-cag/odfi-rfg.git","svn_url":"https://github.com/unihd-cag/odfi-rfg","homepage":"http://unihd-cag.github.io/odfi-rfg/","size":3388,"stargazers_count":0,"watchers_count":0,"language":"Tcl","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":20,"forks":0,"open_issues":20,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls/42"},"html":{"href":"https://github.com/unihd-cag/odfi-rfg/pull/42"},"issue":{"href":"https://api.github.com/repos/unihd-cag/odfi-rfg/issues/42"},"comments":{"href":"https://api.github.com/repos/unihd-cag/odfi-rfg/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/unihd-cag/odfi-rfg/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/unihd-cag/odfi-rfg/statuses/369aa8e4214b9b134db8d6be97ee58ca4b2bb438"}}}}