{"action":"created","comment":{"url":"https://api.github.com/repos/OPAE/opae-sdk/pulls/comments/183163138","pull_request_review_id":114118028,"id":183163138,"diff_hunk":"@@ -66,17 +66,41 @@ module ase_top();\n    logic [1:0] pck_cp2af_pwrState;   // CCI-P AFU Power State\n    logic       pck_cp2af_error;      // CCI-P Protocol Error Detected\n \n+   genvar b;\n+\n `ifdef PLATFORM_PROVIDES_LOCAL_MEMORY\n+ // Now many memory banks?\n+ `ifdef AFU_TOP_REQUIRES_LOCAL_MEMORY_AVALON_MM_LEGACY_WIRES_2BANK\n+   localparam NUM_LOCAL_MEM_BANKS = 2;\n+ `else\n+   localparam NUM_LOCAL_MEM_BANKS = `AFU_TOP_REQUIRES_LOCAL_MEMORY_AVALON_MM;\n+ `endif\n+\n+   // The ddr4 array size must be an even number, whether or not NUM_LOCAL_MEM_BANKS\n+   // is even.  This is due to the way the emulator is structured in emif_ddr4\n+   // below.  When NUM_LOCAL_MEM_BANKS is odd an extra slot will be instantiated\n+   // but not passed to the AFU.\n+   localparam NUM_ALLOC_MEM_BANKS = (((NUM_LOCAL_MEM_BANKS + 1) >> 1) << 1);\n+\n    // DDR clock will come from the memory emulator\n-   logic ddr4_avmm_clk[2];\n+   logic ddr4_avmm_clk[NUM_ALLOC_MEM_BANKS];\n \n    // Interfaces for all DDR memory banks\n-   avalon_mem_if#(.ENABLE_LOG(1)) ddr4[2](ddr4_avmm_clk, pck_cp2af_softReset);\n-   defparam ddr4[0].BANK_NUMBER = 0;\n-   defparam ddr4[1].BANK_NUMBER = 1;\n+   avalon_mem_if#(.ENABLE_LOG(1), .NUM_BANKS(NUM_LOCAL_MEM_BANKS))\n+      ddr4[NUM_ALLOC_MEM_BANKS](ddr4_avmm_clk, pck_cp2af_softReset);\n+\n+   generate","path":"ase/rtl/ase_top.sv","position":31,"original_position":31,"commit_id":"e00bc19d36f91c2718c253a853c9ff3186c38181","original_commit_id":"e00bc19d36f91c2718c253a853c9ff3186c38181","user":{"login":"lzhan55","id":31671970,"avatar_url":"https://avatars3.githubusercontent.com/u/31671970?v=4","gravatar_id":"","url":"https://api.github.com/users/lzhan55","html_url":"https://github.com/lzhan55","followers_url":"https://api.github.com/users/lzhan55/followers","following_url":"https://api.github.com/users/lzhan55/following{/other_user}","gists_url":"https://api.github.com/users/lzhan55/gists{/gist_id}","starred_url":"https://api.github.com/users/lzhan55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lzhan55/subscriptions","organizations_url":"https://api.github.com/users/lzhan55/orgs","repos_url":"https://api.github.com/users/lzhan55/repos","events_url":"https://api.github.com/users/lzhan55/events{/privacy}","received_events_url":"https://api.github.com/users/lzhan55/received_events","type":"User","site_admin":false},"body":"Thank you. So for the memory interface emif below, keyword 'generate' should definitely be used since it will generate interface blocks, right?","created_at":"2018-04-20T20:35:59Z","updated_at":"2018-04-20T20:35:59Z","html_url":"https://github.com/OPAE/opae-sdk/pull/360#discussion_r183163138","pull_request_url":"https://api.github.com/repos/OPAE/opae-sdk/pulls/360","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/OPAE/opae-sdk/pulls/comments/183163138"},"html":{"href":"https://github.com/OPAE/opae-sdk/pull/360#discussion_r183163138"},"pull_request":{"href":"https://api.github.com/repos/OPAE/opae-sdk/pulls/360"}},"in_reply_to_id":183160009},"pull_request":{"url":"https://api.github.com/repos/OPAE/opae-sdk/pulls/360","id":183130760,"html_url":"https://github.com/OPAE/opae-sdk/pull/360","diff_url":"https://github.com/OPAE/opae-sdk/pull/360.diff","patch_url":"https://github.com/OPAE/opae-sdk/pull/360.patch","issue_url":"https://api.github.com/repos/OPAE/opae-sdk/issues/360","number":360,"state":"open","locked":false,"title":" ASE: Model an arbitrary number of memory banks","user":{"login":"michael-adler","id":10950878,"avatar_url":"https://avatars0.githubusercontent.com/u/10950878?v=4","gravatar_id":"","url":"https://api.github.com/users/michael-adler","html_url":"https://github.com/michael-adler","followers_url":"https://api.github.com/users/michael-adler/followers","following_url":"https://api.github.com/users/michael-adler/following{/other_user}","gists_url":"https://api.github.com/users/michael-adler/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-adler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-adler/subscriptions","organizations_url":"https://api.github.com/users/michael-adler/orgs","repos_url":"https://api.github.com/users/michael-adler/repos","events_url":"https://api.github.com/users/michael-adler/events{/privacy}","received_events_url":"https://api.github.com/users/michael-adler/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-20T17:57:25Z","updated_at":"2018-04-20T20:35:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf0d8d593d76d00cd2abb799481993876a41cb6b","assignee":null,"assignees":[],"requested_reviewers":[{"login":"deepakcu84","id":32280626,"avatar_url":"https://avatars1.githubusercontent.com/u/32280626?v=4","gravatar_id":"","url":"https://api.github.com/users/deepakcu84","html_url":"https://github.com/deepakcu84","followers_url":"https://api.github.com/users/deepakcu84/followers","following_url":"https://api.github.com/users/deepakcu84/following{/other_user}","gists_url":"https://api.github.com/users/deepakcu84/gists{/gist_id}","starred_url":"https://api.github.com/users/deepakcu84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepakcu84/subscriptions","organizations_url":"https://api.github.com/users/deepakcu84/orgs","repos_url":"https://api.github.com/users/deepakcu84/repos","events_url":"https://api.github.com/users/deepakcu84/events{/privacy}","received_events_url":"https://api.github.com/users/deepakcu84/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OPAE/opae-sdk/pulls/360/commits","review_comments_url":"https://api.github.com/repos/OPAE/opae-sdk/pulls/360/comments","review_comment_url":"https://api.github.com/repos/OPAE/opae-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OPAE/opae-sdk/issues/360/comments","statuses_url":"https://api.github.com/repos/OPAE/opae-sdk/statuses/e00bc19d36f91c2718c253a853c9ff3186c38181","head":{"label":"OPAE:mcadler/ase_mem_banks","ref":"mcadler/ase_mem_banks","sha":"e00bc19d36f91c2718c253a853c9ff3186c38181","user":{"login":"OPAE","id":30705801,"avatar_url":"https://avatars2.githubusercontent.com/u/30705801?v=4","gravatar_id":"","url":"https://api.github.com/users/OPAE","html_url":"https://github.com/OPAE","followers_url":"https://api.github.com/users/OPAE/followers","following_url":"https://api.github.com/users/OPAE/following{/other_user}","gists_url":"https://api.github.com/users/OPAE/gists{/gist_id}","starred_url":"https://api.github.com/users/OPAE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OPAE/subscriptions","organizations_url":"https://api.github.com/users/OPAE/orgs","repos_url":"https://api.github.com/users/OPAE/repos","events_url":"https://api.github.com/users/OPAE/events{/privacy}","received_events_url":"https://api.github.com/users/OPAE/received_events","type":"Organization","site_admin":false},"repo":{"id":102083635,"name":"opae-sdk","full_name":"OPAE/opae-sdk","owner":{"login":"OPAE","id":30705801,"avatar_url":"https://avatars2.githubusercontent.com/u/30705801?v=4","gravatar_id":"","url":"https://api.github.com/users/OPAE","html_url":"https://github.com/OPAE","followers_url":"https://api.github.com/users/OPAE/followers","following_url":"https://api.github.com/users/OPAE/following{/other_user}","gists_url":"https://api.github.com/users/OPAE/gists{/gist_id}","starred_url":"https://api.github.com/users/OPAE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OPAE/subscriptions","organizations_url":"https://api.github.com/users/OPAE/orgs","repos_url":"https://api.github.com/users/OPAE/repos","events_url":"https://api.github.com/users/OPAE/events{/privacy}","received_events_url":"https://api.github.com/users/OPAE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OPAE/opae-sdk","description":"Open Programmable Acceleration Engine","fork":false,"url":"https://api.github.com/repos/OPAE/opae-sdk","forks_url":"https://api.github.com/repos/OPAE/opae-sdk/forks","keys_url":"https://api.github.com/repos/OPAE/opae-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OPAE/opae-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OPAE/opae-sdk/teams","hooks_url":"https://api.github.com/repos/OPAE/opae-sdk/hooks","issue_events_url":"https://api.github.com/repos/OPAE/opae-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/OPAE/opae-sdk/events","assignees_url":"https://api.github.com/repos/OPAE/opae-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/OPAE/opae-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/OPAE/opae-sdk/tags","blobs_url":"https://api.github.com/repos/OPAE/opae-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OPAE/opae-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OPAE/opae-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/OPAE/opae-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OPAE/opae-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/OPAE/opae-sdk/languages","stargazers_url":"https://api.github.com/repos/OPAE/opae-sdk/stargazers","contributors_url":"https://api.github.com/repos/OPAE/opae-sdk/contributors","subscribers_url":"https://api.github.com/repos/OPAE/opae-sdk/subscribers","subscription_url":"https://api.github.com/repos/OPAE/opae-sdk/subscription","commits_url":"https://api.github.com/repos/OPAE/opae-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/OPAE/opae-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/OPAE/opae-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/OPAE/opae-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/OPAE/opae-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/OPAE/opae-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OPAE/opae-sdk/merges","archive_url":"https://api.github.com/repos/OPAE/opae-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OPAE/opae-sdk/downloads","issues_url":"https://api.github.com/repos/OPAE/opae-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/OPAE/opae-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/OPAE/opae-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/OPAE/opae-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OPAE/opae-sdk/labels{/name}","releases_url":"https://api.github.com/repos/OPAE/opae-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/OPAE/opae-sdk/deployments","created_at":"2017-09-01T07:00:50Z","updated_at":"2018-04-20T18:52:21Z","pushed_at":"2018-04-20T19:38:06Z","git_url":"git://github.com/OPAE/opae-sdk.git","ssh_url":"git@github.com:OPAE/opae-sdk.git","clone_url":"https://github.com/OPAE/opae-sdk.git","svn_url":"https://github.com/OPAE/opae-sdk","homepage":"https://01.org/OPAE","size":4301,"stargazers_count":82,"watchers_count":82,"language":"Verilog","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":27,"open_issues":28,"watchers":82,"default_branch":"master"}},"base":{"label":"OPAE:master","ref":"master","sha":"72d57b01692ca14781ee5a42d577bdd293c9f4cd","user":{"login":"OPAE","id":30705801,"avatar_url":"https://avatars2.githubusercontent.com/u/30705801?v=4","gravatar_id":"","url":"https://api.github.com/users/OPAE","html_url":"https://github.com/OPAE","followers_url":"https://api.github.com/users/OPAE/followers","following_url":"https://api.github.com/users/OPAE/following{/other_user}","gists_url":"https://api.github.com/users/OPAE/gists{/gist_id}","starred_url":"https://api.github.com/users/OPAE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OPAE/subscriptions","organizations_url":"https://api.github.com/users/OPAE/orgs","repos_url":"https://api.github.com/users/OPAE/repos","events_url":"https://api.github.com/users/OPAE/events{/privacy}","received_events_url":"https://api.github.com/users/OPAE/received_events","type":"Organization","site_admin":false},"repo":{"id":102083635,"name":"opae-sdk","full_name":"OPAE/opae-sdk","owner":{"login":"OPAE","id":30705801,"avatar_url":"https://avatars2.githubusercontent.com/u/30705801?v=4","gravatar_id":"","url":"https://api.github.com/users/OPAE","html_url":"https://github.com/OPAE","followers_url":"https://api.github.com/users/OPAE/followers","following_url":"https://api.github.com/users/OPAE/following{/other_user}","gists_url":"https://api.github.com/users/OPAE/gists{/gist_id}","starred_url":"https://api.github.com/users/OPAE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OPAE/subscriptions","organizations_url":"https://api.github.com/users/OPAE/orgs","repos_url":"https://api.github.com/users/OPAE/repos","events_url":"https://api.github.com/users/OPAE/events{/privacy}","received_events_url":"https://api.github.com/users/OPAE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OPAE/opae-sdk","description":"Open Programmable Acceleration Engine","fork":false,"url":"https://api.github.com/repos/OPAE/opae-sdk","forks_url":"https://api.github.com/repos/OPAE/opae-sdk/forks","keys_url":"https://api.github.com/repos/OPAE/opae-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OPAE/opae-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OPAE/opae-sdk/teams","hooks_url":"https://api.github.com/repos/OPAE/opae-sdk/hooks","issue_events_url":"https://api.github.com/repos/OPAE/opae-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/OPAE/opae-sdk/events","assignees_url":"https://api.github.com/repos/OPAE/opae-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/OPAE/opae-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/OPAE/opae-sdk/tags","blobs_url":"https://api.github.com/repos/OPAE/opae-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OPAE/opae-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OPAE/opae-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/OPAE/opae-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OPAE/opae-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/OPAE/opae-sdk/languages","stargazers_url":"https://api.github.com/repos/OPAE/opae-sdk/stargazers","contributors_url":"https://api.github.com/repos/OPAE/opae-sdk/contributors","subscribers_url":"https://api.github.com/repos/OPAE/opae-sdk/subscribers","subscription_url":"https://api.github.com/repos/OPAE/opae-sdk/subscription","commits_url":"https://api.github.com/repos/OPAE/opae-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/OPAE/opae-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/OPAE/opae-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/OPAE/opae-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/OPAE/opae-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/OPAE/opae-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OPAE/opae-sdk/merges","archive_url":"https://api.github.com/repos/OPAE/opae-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OPAE/opae-sdk/downloads","issues_url":"https://api.github.com/repos/OPAE/opae-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/OPAE/opae-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/OPAE/opae-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/OPAE/opae-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OPAE/opae-sdk/labels{/name}","releases_url":"https://api.github.com/repos/OPAE/opae-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/OPAE/opae-sdk/deployments","created_at":"2017-09-01T07:00:50Z","updated_at":"2018-04-20T18:52:21Z","pushed_at":"2018-04-20T19:38:06Z","git_url":"git://github.com/OPAE/opae-sdk.git","ssh_url":"git@github.com:OPAE/opae-sdk.git","clone_url":"https://github.com/OPAE/opae-sdk.git","svn_url":"https://github.com/OPAE/opae-sdk","homepage":"https://01.org/OPAE","size":4301,"stargazers_count":82,"watchers_count":82,"language":"Verilog","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":27,"open_issues":28,"watchers":82,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OPAE/opae-sdk/pulls/360"},"html":{"href":"https://github.com/OPAE/opae-sdk/pull/360"},"issue":{"href":"https://api.github.com/repos/OPAE/opae-sdk/issues/360"},"comments":{"href":"https://api.github.com/repos/OPAE/opae-sdk/issues/360/comments"},"review_comments":{"href":"https://api.github.com/repos/OPAE/opae-sdk/pulls/360/comments"},"review_comment":{"href":"https://api.github.com/repos/OPAE/opae-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OPAE/opae-sdk/pulls/360/commits"},"statuses":{"href":"https://api.github.com/repos/OPAE/opae-sdk/statuses/e00bc19d36f91c2718c253a853c9ff3186c38181"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"lzhan55"}}