{"action":"created","issue":{"url":"https://api.github.com/repos/pavel-demin/red-pitaya-notes/issues/168","labels_url":"https://api.github.com/repos/pavel-demin/red-pitaya-notes/issues/168/labels{/name}","comments_url":"https://api.github.com/repos/pavel-demin/red-pitaya-notes/issues/168/comments","events_url":"https://api.github.com/repos/pavel-demin/red-pitaya-notes/issues/168/events","html_url":"https://github.com/pavel-demin/red-pitaya-notes/issues/168","id":127897084,"number":168,"title":"Two buffers","user":{"login":"YevgeniyIvanov","id":14821187,"avatar_url":"https://avatars.githubusercontent.com/u/14821187?v=3","gravatar_id":"","url":"https://api.github.com/users/YevgeniyIvanov","html_url":"https://github.com/YevgeniyIvanov","followers_url":"https://api.github.com/users/YevgeniyIvanov/followers","following_url":"https://api.github.com/users/YevgeniyIvanov/following{/other_user}","gists_url":"https://api.github.com/users/YevgeniyIvanov/gists{/gist_id}","starred_url":"https://api.github.com/users/YevgeniyIvanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YevgeniyIvanov/subscriptions","organizations_url":"https://api.github.com/users/YevgeniyIvanov/orgs","repos_url":"https://api.github.com/users/YevgeniyIvanov/repos","events_url":"https://api.github.com/users/YevgeniyIvanov/events{/privacy}","received_events_url":"https://api.github.com/users/YevgeniyIvanov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-21T10:49:38Z","updated_at":"2016-01-21T12:32:51Z","closed_at":null,"body":"Hi Pavel,\r\nCan you help me understand how change axis_ram_writer for use two buffers.\r\nFirst buffer from 0x1E000000, second buffer from 0x1E3FFFFF.\r\nI want use trigger for change the buffer.\r\nYevgeniy.\r\n"},"comment":{"url":"https://api.github.com/repos/pavel-demin/red-pitaya-notes/issues/comments/173557442","html_url":"https://github.com/pavel-demin/red-pitaya-notes/issues/168#issuecomment-173557442","issue_url":"https://api.github.com/repos/pavel-demin/red-pitaya-notes/issues/168","id":173557442,"user":{"login":"pavel-demin","id":8037893,"avatar_url":"https://avatars.githubusercontent.com/u/8037893?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-demin","html_url":"https://github.com/pavel-demin","followers_url":"https://api.github.com/users/pavel-demin/followers","following_url":"https://api.github.com/users/pavel-demin/following{/other_user}","gists_url":"https://api.github.com/users/pavel-demin/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-demin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-demin/subscriptions","organizations_url":"https://api.github.com/users/pavel-demin/orgs","repos_url":"https://api.github.com/users/pavel-demin/repos","events_url":"https://api.github.com/users/pavel-demin/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-demin/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T12:32:51Z","updated_at":"2016-01-21T12:32:51Z","body":"Hi Yevgeniy,\r\n\r\nI'd set the starting address of the writer to 0x1E400000 (507510784) and limit the accessible address space to 4 MB by setting ADDR_WIDTH to 19.\r\n\r\nThen it's possible to use one or two writers.\r\n\r\nIn case of one writer, you need to set writer_0/cfg_data to 503316480 or to 507510784 depending on the state of your trigger.\r\n\r\nIn case of two writers, the second writer can be connected to S_AXI_HP1 and you need to use some kind of AXI4-Stream switch to redirect the data stream to the first or to the second writer depending on the state of your trigger.\r\n\r\nFor the switch functionality, it's possible to use two [axis_validator](https://github.com/pavel-demin/red-pitaya-notes/tree/master/cores/axis_validator_v1_0) modules:\r\n\r\n```\r\n# Create axis_validator\r\ncell pavel-demin:user:axis_validator:1.0 vldtr_0 {\r\n  AXIS_TDATA_WIDTH 32\r\n} {\r\n  S_AXIS input_0/M_AXIS\r\n  trg_flag <enable vldtr_0>\r\n  aclk ps_0/FCLK_CLK0\r\n}\r\n\r\n# Create xlconstant\r\ncell xilinx.com:ip:xlconstant:1.1 const_1 {\r\n  CONST_WIDTH 32\r\n  CONST_VAL 503316480\r\n}\r\n\r\n# Create axis_ram_writer\r\ncell pavel-demin:user:axis_ram_writer:1.0 writer_0 {\r\n  ADDR_WIDTH 19\r\n} {\r\n  S_AXIS vldtr_0/M_AXIS\r\n  M_AXI ps_0/S_AXI_HP0\r\n  cfg_data const_1/dout\r\n  aclk ps_0/FCLK_CLK0\r\n  aresetn slice_1/Dout\r\n}\r\n\r\n# Create axis_validator\r\ncell pavel-demin:user:axis_validator:1.0 vldtr_1 {\r\n  AXIS_TDATA_WIDTH 32\r\n} {\r\n  S_AXIS input_1/M_AXIS\r\n  trg_flag <enable vldtr_1>\r\n  aclk ps_0/FCLK_CLK0\r\n}\r\n\r\n# Create xlconstant\r\ncell xilinx.com:ip:xlconstant:1.1 const_2 {\r\n  CONST_WIDTH 32\r\n  CONST_VAL 507510784\r\n}\r\n\r\n# Create axis_ram_writer\r\ncell pavel-demin:user:axis_ram_writer:1.0 writer_1 {\r\n  ADDR_WIDTH 19\r\n} {\r\n  S_AXIS vldtr_1/M_AXIS\r\n  M_AXI ps_0/S_AXI_HP0\r\n  cfg_data const_2/dout\r\n  aclk ps_0/FCLK_CLK0\r\n  aresetn slice_2/Dout\r\n}\r\n```"}}