{"action":"created","issue":{"url":"https://api.github.com/repos/cliffordwolf/picorv32/issues/14","repository_url":"https://api.github.com/repos/cliffordwolf/picorv32","labels_url":"https://api.github.com/repos/cliffordwolf/picorv32/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/cliffordwolf/picorv32/issues/14/comments","events_url":"https://api.github.com/repos/cliffordwolf/picorv32/issues/14/events","html_url":"https://github.com/cliffordwolf/picorv32/pull/14","id":173704533,"number":14,"title":"Fast multiplier","user":{"login":"wallclimber21","id":70348,"avatar_url":"https://avatars.githubusercontent.com/u/70348?v=3","gravatar_id":"","url":"https://api.github.com/users/wallclimber21","html_url":"https://github.com/wallclimber21","followers_url":"https://api.github.com/users/wallclimber21/followers","following_url":"https://api.github.com/users/wallclimber21/following{/other_user}","gists_url":"https://api.github.com/users/wallclimber21/gists{/gist_id}","starred_url":"https://api.github.com/users/wallclimber21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wallclimber21/subscriptions","organizations_url":"https://api.github.com/users/wallclimber21/orgs","repos_url":"https://api.github.com/users/wallclimber21/repos","events_url":"https://api.github.com/users/wallclimber21/events{/privacy}","received_events_url":"https://api.github.com/users/wallclimber21/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"cliffordwolf","id":619764,"avatar_url":"https://avatars.githubusercontent.com/u/619764?v=3","gravatar_id":"","url":"https://api.github.com/users/cliffordwolf","html_url":"https://github.com/cliffordwolf","followers_url":"https://api.github.com/users/cliffordwolf/followers","following_url":"https://api.github.com/users/cliffordwolf/following{/other_user}","gists_url":"https://api.github.com/users/cliffordwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/cliffordwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cliffordwolf/subscriptions","organizations_url":"https://api.github.com/users/cliffordwolf/orgs","repos_url":"https://api.github.com/users/cliffordwolf/repos","events_url":"https://api.github.com/users/cliffordwolf/events{/privacy}","received_events_url":"https://api.github.com/users/cliffordwolf/received_events","type":"User","site_admin":false},"assignees":[{"login":"cliffordwolf","id":619764,"avatar_url":"https://avatars.githubusercontent.com/u/619764?v=3","gravatar_id":"","url":"https://api.github.com/users/cliffordwolf","html_url":"https://github.com/cliffordwolf","followers_url":"https://api.github.com/users/cliffordwolf/followers","following_url":"https://api.github.com/users/cliffordwolf/following{/other_user}","gists_url":"https://api.github.com/users/cliffordwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/cliffordwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cliffordwolf/subscriptions","organizations_url":"https://api.github.com/users/cliffordwolf/orgs","repos_url":"https://api.github.com/users/cliffordwolf/repos","events_url":"https://api.github.com/users/cliffordwolf/events{/privacy}","received_events_url":"https://api.github.com/users/cliffordwolf/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-08-29T06:25:21Z","updated_at":"2016-08-29T18:24:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cliffordwolf/picorv32/pulls/14","html_url":"https://github.com/cliffordwolf/picorv32/pull/14","diff_url":"https://github.com/cliffordwolf/picorv32/pull/14.diff","patch_url":"https://github.com/cliffordwolf/picorv32/pull/14.patch"},"body":"This change adds support for a fast multiplier by using the DSPs that are often in an FPGA.  In many cases, DSP resources are plenty, but registers and combinational logic are not. Furthermore, it's nice to have a much faster multiply.\r\n\r\nFor my particular picorv32 configuration that I tested on a Cyclone IV:\r\n\r\nstandard multiplier: 4847 combinational functions and 2315 registers\r\nfast multiplier: 4587 combinationl function and 2126 registers (and 8 9-bit DSP multipliers)\r\n\r\nWhen ENABLE_FAST_MUL is set to 1, the value of ENABLE_MUL is ignored: it can be either 0 or 1, in both case the fast multiplier is used.\r\n\r\nNote: when the fast multiplier is enabled, the testbench fails in the irq.c part that tests for compressed isa q0 reg handling. My Risc-V understanding is still too limited to understand what's going on there, but since the error triggers long after the last multiplier instruction has completed, I think it's a false error.\r\n\r\nWhen I comment out that check in irq.c, all other tests, including multtest, are passing fine."},"comment":{"url":"https://api.github.com/repos/cliffordwolf/picorv32/issues/comments/243209975","html_url":"https://github.com/cliffordwolf/picorv32/pull/14#issuecomment-243209975","issue_url":"https://api.github.com/repos/cliffordwolf/picorv32/issues/14","id":243209975,"user":{"login":"wallclimber21","id":70348,"avatar_url":"https://avatars.githubusercontent.com/u/70348?v=3","gravatar_id":"","url":"https://api.github.com/users/wallclimber21","html_url":"https://github.com/wallclimber21","followers_url":"https://api.github.com/users/wallclimber21/followers","following_url":"https://api.github.com/users/wallclimber21/following{/other_user}","gists_url":"https://api.github.com/users/wallclimber21/gists{/gist_id}","starred_url":"https://api.github.com/users/wallclimber21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wallclimber21/subscriptions","organizations_url":"https://api.github.com/users/wallclimber21/orgs","repos_url":"https://api.github.com/users/wallclimber21/repos","events_url":"https://api.github.com/users/wallclimber21/events{/privacy}","received_events_url":"https://api.github.com/users/wallclimber21/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T18:24:24Z","updated_at":"2016-08-29T18:24:24Z","body":"Right now, I'm capturing rs1 and rs2 as 32-bits and then I expand them and multiply.\r\n\r\nIt turns out that this is not optimal: if I capture them as expanded 64-bits right away, the full 64 bits can be stored as registers in the DSP, less DSPs are used, and much better timing is achieved: on my non-Cyclone Altera device, I'm going from 174MHz to over 300MHz! (This is all Altera specific, but I don't think things will be different for other FPGAs.)\r\n\r\nSo, for now, it's probably better to hold off until I have the best configuration."}}
{"actor":{"display_login":"wallclimber21"}}