{"action":"created","issue":{"url":"https://api.github.com/repos/pulp-platform/riscv-dbg/issues/27","repository_url":"https://api.github.com/repos/pulp-platform/riscv-dbg","labels_url":"https://api.github.com/repos/pulp-platform/riscv-dbg/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/pulp-platform/riscv-dbg/issues/27/comments","events_url":"https://api.github.com/repos/pulp-platform/riscv-dbg/issues/27/events","html_url":"https://github.com/pulp-platform/riscv-dbg/pull/27","id":488273896,"node_id":"MDExOlB1bGxSZXF1ZXN0MzEzMzMzMDgy","number":27,"title":"32-bit slave access to Abstract Data","user":{"login":"brabect1","id":15312701,"node_id":"MDQ6VXNlcjE1MzEyNzAx","avatar_url":"https://avatars2.githubusercontent.com/u/15312701?v=4","gravatar_id":"","url":"https://api.github.com/users/brabect1","html_url":"https://github.com/brabect1","followers_url":"https://api.github.com/users/brabect1/followers","following_url":"https://api.github.com/users/brabect1/following{/other_user}","gists_url":"https://api.github.com/users/brabect1/gists{/gist_id}","starred_url":"https://api.github.com/users/brabect1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brabect1/subscriptions","organizations_url":"https://api.github.com/users/brabect1/orgs","repos_url":"https://api.github.com/users/brabect1/repos","events_url":"https://api.github.com/users/brabect1/events{/privacy}","received_events_url":"https://api.github.com/users/brabect1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-09-02T17:16:48Z","updated_at":"2019-09-02T18:37:22Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/pulp-platform/riscv-dbg/pulls/27","html_url":"https://github.com/pulp-platform/riscv-dbg/pull/27","diff_url":"https://github.com/pulp-platform/riscv-dbg/pull/27.diff","patch_url":"https://github.com/pulp-platform/riscv-dbg/pull/27.patch"},"body":"There are two flaws in present implementation of slave access (i.e. from CPU) to Abstract Data area:\r\n* Writes do not work correctly with 32-bit access.\r\n* Reads and writes do not work correctly for `dm::DataCount` other than two.\r\n\r\nThis pull request shows a possible fix. Not the prettiest code I wrote, but is fairly minimal in what it changes. It was tested only for 32-bit access and need to be verified for 64-bit one."},"comment":{"url":"https://api.github.com/repos/pulp-platform/riscv-dbg/issues/comments/527221103","html_url":"https://github.com/pulp-platform/riscv-dbg/pull/27#issuecomment-527221103","issue_url":"https://api.github.com/repos/pulp-platform/riscv-dbg/issues/27","id":527221103,"node_id":"MDEyOklzc3VlQ29tbWVudDUyNzIyMTEwMw==","user":{"login":"bluewww","id":13798471,"node_id":"MDQ6VXNlcjEzNzk4NDcx","avatar_url":"https://avatars2.githubusercontent.com/u/13798471?v=4","gravatar_id":"","url":"https://api.github.com/users/bluewww","html_url":"https://github.com/bluewww","followers_url":"https://api.github.com/users/bluewww/followers","following_url":"https://api.github.com/users/bluewww/following{/other_user}","gists_url":"https://api.github.com/users/bluewww/gists{/gist_id}","starred_url":"https://api.github.com/users/bluewww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluewww/subscriptions","organizations_url":"https://api.github.com/users/bluewww/orgs","repos_url":"https://api.github.com/users/bluewww/repos","events_url":"https://api.github.com/users/bluewww/events{/privacy}","received_events_url":"https://api.github.com/users/bluewww/received_events","type":"User","site_admin":false},"created_at":"2019-09-02T18:37:22Z","updated_at":"2019-09-02T18:37:22Z","author_association":"COLLABORATOR","body":"Ok I think I see what you mean. Imo it's much easier to make `data_bits` to the same type as `data_i` (`[dm::DataCount-1:0][31:0]`) and then just add a for loop around this\r\n\r\n```\r\n                        for (int i = 0; i < $bits(be_i); i++) begin\r\n                            if (be_i[i]) begin\r\n                                data_bits[i*8+:8] = wdata_i[i*8+:8];\r\n                            end\r\n                        end\r\n```\r\nDid you consider this approach?"}}
{"actor":{"display_login":"bluewww"}}