{"action":"created","issue":{"url":"https://api.github.com/repos/ucb-bar/firrtl/issues/196","repository_url":"https://api.github.com/repos/ucb-bar/firrtl","labels_url":"https://api.github.com/repos/ucb-bar/firrtl/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/ucb-bar/firrtl/issues/196/comments","events_url":"https://api.github.com/repos/ucb-bar/firrtl/issues/196/events","html_url":"https://github.com/ucb-bar/firrtl/issues/196","id":164764436,"number":196,"title":"Tail operation","user":{"login":"da-steve101","id":3221447,"avatar_url":"https://avatars.githubusercontent.com/u/3221447?v=3","gravatar_id":"","url":"https://api.github.com/users/da-steve101","html_url":"https://github.com/da-steve101","followers_url":"https://api.github.com/users/da-steve101/followers","following_url":"https://api.github.com/users/da-steve101/following{/other_user}","gists_url":"https://api.github.com/users/da-steve101/gists{/gist_id}","starred_url":"https://api.github.com/users/da-steve101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/da-steve101/subscriptions","organizations_url":"https://api.github.com/users/da-steve101/orgs","repos_url":"https://api.github.com/users/da-steve101/repos","events_url":"https://api.github.com/users/da-steve101/events{/privacy}","received_events_url":"https://api.github.com/users/da-steve101/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-11T05:47:01Z","updated_at":"2016-07-27T21:13:21Z","closed_at":"2016-07-27T21:13:21Z","body":"Shouldn't tail indicate how many bits from the end to keep rather than drop?\r\nCurrently this returns myTail = 42 ( taking last 7 bits) rather than myTail = 2 ( taking last 3 bits )\r\nThe only other language I can think of that uses the tail(3) format instead of drop(7) (more the behaviour demonstrated here) is [R](http://rfunction.com/archives/699).\r\n```scala\r\nclass TailTest extends Module {\r\n  val io = new Bundle {\r\n    val a = UInt( INPUT, 10 )\r\n    val b = UInt( OUTPUT, 10 )\r\n  }\r\n  io.b := io.a.tail(3)\r\n}\r\n\r\nclass TailTester extends BasicTester {\r\n  val dut = Module( new TailTest )\r\n  dut.io.a := UInt( 682, 10 )\r\n  assert( dut.io.b === UInt( 2, 10 ) )\r\n  stop()\r\n}\r\n\r\nclass TailOpsSpec extends ChiselPropSpec with Matchers {\r\n  property(\"TailTester should return the correct result\") {\r\n    assertTesterPasses{ new TailTester }\r\n  }\r\n}\r\n```\r\nSee the .fir and .v file in [TailTester.zip](https://github.com/ucb-bar/firrtl/files/356474/TailTester.zip)\r\n"},"comment":{"url":"https://api.github.com/repos/ucb-bar/firrtl/issues/comments/235722879","html_url":"https://github.com/ucb-bar/firrtl/issues/196#issuecomment-235722879","issue_url":"https://api.github.com/repos/ucb-bar/firrtl/issues/196","id":235722879,"user":{"login":"azidar","id":5377148,"avatar_url":"https://avatars.githubusercontent.com/u/5377148?v=3","gravatar_id":"","url":"https://api.github.com/users/azidar","html_url":"https://github.com/azidar","followers_url":"https://api.github.com/users/azidar/followers","following_url":"https://api.github.com/users/azidar/following{/other_user}","gists_url":"https://api.github.com/users/azidar/gists{/gist_id}","starred_url":"https://api.github.com/users/azidar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azidar/subscriptions","organizations_url":"https://api.github.com/users/azidar/orgs","repos_url":"https://api.github.com/users/azidar/repos","events_url":"https://api.github.com/users/azidar/events{/privacy}","received_events_url":"https://api.github.com/users/azidar/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T21:13:21Z","updated_at":"2016-07-27T21:13:21Z","body":"#205 "}}
{"actor":{"display_login":"azidar"}}