{"action":"opened","issue":{"url":"https://api.github.com/repos/UCSBarchlab/PyRTL/issues/148","repository_url":"https://api.github.com/repos/UCSBarchlab/PyRTL","labels_url":"https://api.github.com/repos/UCSBarchlab/PyRTL/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/UCSBarchlab/PyRTL/issues/148/comments","events_url":"https://api.github.com/repos/UCSBarchlab/PyRTL/issues/148/events","html_url":"https://github.com/UCSBarchlab/PyRTL/issues/148","id":158212698,"number":148,"title":"Assignments to \"name\" break FastSimulation","user":{"login":"jemcmahan13","id":7453617,"avatar_url":"https://avatars.githubusercontent.com/u/7453617?v=3","gravatar_id":"","url":"https://api.github.com/users/jemcmahan13","html_url":"https://github.com/jemcmahan13","followers_url":"https://api.github.com/users/jemcmahan13/followers","following_url":"https://api.github.com/users/jemcmahan13/following{/other_user}","gists_url":"https://api.github.com/users/jemcmahan13/gists{/gist_id}","starred_url":"https://api.github.com/users/jemcmahan13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jemcmahan13/subscriptions","organizations_url":"https://api.github.com/users/jemcmahan13/orgs","repos_url":"https://api.github.com/users/jemcmahan13/repos","events_url":"https://api.github.com/users/jemcmahan13/events{/privacy}","received_events_url":"https://api.github.com/users/jemcmahan13/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/UCSBarchlab/PyRTL/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/UCSBarchlab/PyRTL/labels/confusing%20or%20uncaught%20error","name":"confusing or uncaught error","color":"931999"},{"url":"https://api.github.com/repos/UCSBarchlab/PyRTL/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-02T18:50:09Z","updated_at":"2016-06-02T18:50:09Z","closed_at":null,"body":"Simulation and FastSimulation should present the same interface, but some code that works with the former will not work with the latter. Specifically, if an elaboration program assigns to `.name` of a `WireVector`, FastSimulation encounters a `KeyError`.\r\n\r\n```\r\nfrom pyrtl import *\r\n\r\ninw = Input(8)\r\noutw = Output(8)\r\nw = WireVector(8)\r\nw <<= inw\r\noutw <<= w\r\n\r\nw.name = \"Instr\"\r\n\r\nsim_trace = SimulationTrace()\r\nsim = FastSimulation(tracer=sim_trace)  # this line causes an error\r\nsim = Simulation(tracer=sim_trace)  # with previous line commented out, this works fine\r\n```\r\n\r\nThe problem seems to be because `FastSimulation` relies on the wire names in the `Tracer` object, which are not updated when `name` is assigned to. It seems like the options are either to 1) make `name` updates do all related bookkeeping to keep stuff from breaking (are there other places?); or 2) make `name` immutable."}}
{"actor":{"display_login":"jemcmahan13"}}