)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1001415,"name":"Jonathan McDowell","email":"noodles-openocd@earth.li","username":"u1f35c"},"change_message_id":"feaaa67ca4664114660d313aade3a9fde5d12e8d","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e890e558_e7ee0002","updated":"2022-11-22 09:08:21.000000000","message":"I like that this starts to join together the existing Lattice device support, but it\u0027s unfortunate that we seem to be a in a situation where every device is different enough that we need a new set of PLD subcommands. Is there any mileage in having a single \"pld device lattice\" that uses the JTAG ID to select between the appropriate backend support?","commit_id":"628421a3d343d1db2da4bdfc8913172d6fb4980b"},{"author":{"_account_id":1001415,"name":"Jonathan McDowell","email":"noodles-openocd@earth.li","username":"u1f35c"},"change_message_id":"8b022bd0ab706433953b4ff72d43ddb0c5cf1827","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b4473108_2e092bbe","in_reply_to":"45e8cb45_0c425c8f","updated":"2022-12-10 17:31:54.000000000","message":"It does seem the Lattice devices have quite a lot of variability between them that unfortunately leads to quite separate backend implementations of a lot of pieces.\n\nI like the idea of a single front end that then selects the appropriate backend by family ID; the user then just needs \"pld device lattice\" rather than needing to know the exact family name of the backend. And a file with the common parts (command registration, some of the lattice register fetching stuff which seems shared) and then separate files for distinct bits sounds good rather than a huge lattice.c.\n\nIn terms of making it easier to review perhaps a diff with the initial framework and one backend, then subsequent diffs to add each backend? I don\u0027t have a preference about whether that means updating the current series or an entirely new patch set.\n\nI don\u0027t know if you\u0027ve looked at a flash driver at all, but I\u0027ve got a MachNX (which I think has some overlap with Certus)/ECP5 board where I\u0027d like to be able to dump / program the device internal flash; I\u0027ll let you know if I actually get round to writing any code.","commit_id":"628421a3d343d1db2da4bdfc8913172d6fb4980b"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"92f3e7381939f2f6351749cbb9318d2ad1eaea57","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"cd7665a1_9afc87c8","in_reply_to":"b4473108_2e092bbe","updated":"2022-12-12 22:50:27.000000000","message":"I prepared a new patchset for ecp2/3, ecp5 and certus devices. Rebased intel/efinix/gowin patches and rebased the ipdbg-pld (get hub from pld-driv) patch.\nI will abandon the old lattice patches.\n\nI hope you all like it better this way!\n \nThanks for reviewing and your patience.","commit_id":"628421a3d343d1db2da4bdfc8913172d6fb4980b"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"d46cbb7611fcd2366941a7a4780cbd7686725fb5","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"45e8cb45_0c425c8f","in_reply_to":"e890e558_e7ee0002","updated":"2022-11-24 23:26:23.000000000","message":"I tried to combine all lattice (ecp2 ecp3 ecp5 and certus) into one driver. Gives a single source file of 1kloc. All drivers are very similar but differ in a lot of details. In the end there is not much shared code. But it is easy to select family by id and switch based on the family (already works as expected). Should I refactor into a common lattice.c file (one driver) but use multiple c/h files to separate the code for each family?\n\nDo you like to (re)view the single source-file variant? should i upload a new set to this patch or create a new patch?\n\nbzw: The intel driver is also done like this but the difference between the families are only few.","commit_id":"628421a3d343d1db2da4bdfc8913172d6fb4980b"},{"author":{"_account_id":1000859,"name":"Karl Palsson","email":"karlp@tweak.au","username":"karlp"},"change_message_id":"3a470f76a44a921f2219a868768a9236c9017050","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0321c9f3_95ac583d","updated":"2022-11-29 13:49:02.000000000","message":"reply to reply","commit_id":"a9536c7fa25227f187aec06815f946f4d67bd884"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"19a22a92b1b2670823ca437f78c238a516be4710","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"6fea1033_b11b5716","in_reply_to":"0321c9f3_95ac583d","updated":"2022-11-29 20:51:15.000000000","message":"Done","commit_id":"a9536c7fa25227f187aec06815f946f4d67bd884"},{"author":{"_account_id":1000859,"name":"Karl Palsson","email":"karlp@tweak.au","username":"karlp"},"change_message_id":"0edc470c43d014bfe1fd865716451c589ab02363","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"07aa6e64_3fa754c8","updated":"2022-11-30 09:25:52.000000000","message":"gerrit gerriting like gerrit geritts.","commit_id":"34d369e6812b21c54e8d3dee59bbb2a6eb7ae552"},{"author":{"_account_id":1001415,"name":"Jonathan McDowell","email":"noodles-openocd@earth.li","username":"u1f35c"},"change_message_id":"8b022bd0ab706433953b4ff72d43ddb0c5cf1827","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":7,"id":"61486abd_aaec9023","updated":"2022-12-10 17:31:54.000000000","message":"This seems to share more code, and I like the way it\u0027s going. Few minor comments (and one bigger one about a front end that selects the backend which it appears I wrote a couple of weeks ago and forgot to actually save).","commit_id":"c538eb0b74015fc1a820b73a087da8f91bb8a256"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"fbbcddf6e70a5fffc3c5a650c6e2c6f2c2678a22","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"33f01ab2_8bd81111","in_reply_to":"61486abd_aaec9023","updated":"2022-12-12 22:54:47.000000000","message":"Done","commit_id":"c538eb0b74015fc1a820b73a087da8f91bb8a256"}],"src/pld/certus.c":[{"author":{"_account_id":1000859,"name":"Karl Palsson","email":"karlp@tweak.au","username":"karlp"},"change_message_id":"3a470f76a44a921f2219a868768a9236c9017050","unresolved":true,"context_lines":[{"line_number":248,"context_line":"\t\treturn retval;"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"\tif (bit_file.has_id \u0026\u0026 id !\u003d bit_file.idcode)"},{"line_number":251,"context_line":"\t\tLOG_WARNING(\"id on device and bit-stream don\u0027t match!\");"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"\tretval \u003d certus_load(tap, \u0026bit_file);"},{"line_number":254,"context_line":"\tfree(bit_file.raw_bit.data);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"8a1f03c9_22c9a679","line":251,"updated":"2022-11-29 13:49:02.000000000","message":"In your other ones, you\u0027ve just said \"Id in file: x, id in bitstream: y\"  I\u0027d kinda like to see them merged into \"Id on device (x) and id in bitstream(y) don\u0027t match\" ?  best of both worlds?","commit_id":"a9536c7fa25227f187aec06815f946f4d67bd884"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"19a22a92b1b2670823ca437f78c238a516be4710","unresolved":false,"context_lines":[{"line_number":248,"context_line":"\t\treturn retval;"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"\tif (bit_file.has_id \u0026\u0026 id !\u003d bit_file.idcode)"},{"line_number":251,"context_line":"\t\tLOG_WARNING(\"id on device and bit-stream don\u0027t match!\");"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"\tretval \u003d certus_load(tap, \u0026bit_file);"},{"line_number":254,"context_line":"\tfree(bit_file.raw_bit.data);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"b654975a_321dc778","line":251,"in_reply_to":"8a1f03c9_22c9a679","updated":"2022-11-29 20:51:15.000000000","message":"Shall I do the adjustment for ecp5 as a new patch set now or after the merge? I ask because it is already verified by Anonio Borneo.","commit_id":"a9536c7fa25227f187aec06815f946f4d67bd884"},{"author":{"_account_id":1000859,"name":"Karl Palsson","email":"karlp@tweak.au","username":"karlp"},"change_message_id":"0edc470c43d014bfe1fd865716451c589ab02363","unresolved":true,"context_lines":[{"line_number":248,"context_line":"\t\treturn retval;"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"\tif (bit_file.has_id \u0026\u0026 id !\u003d bit_file.idcode)"},{"line_number":251,"context_line":"\t\tLOG_WARNING(\"id on device and bit-stream don\u0027t match!\");"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"\tretval \u003d certus_load(tap, \u0026bit_file);"},{"line_number":254,"context_line":"\tfree(bit_file.raw_bit.data);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"def12766_7764f2f1","line":251,"in_reply_to":"b654975a_321dc778","updated":"2022-11-30 09:25:52.000000000","message":"I certainly wouldn\u0027t hold anything up for this, but it\u0027s just changing log text, I don\u0027t see Antonio deciding that that means all review progress gets discarded :)","commit_id":"a9536c7fa25227f187aec06815f946f4d67bd884"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"b58bc475911ae717309dcb51efbe266444645ef0","unresolved":false,"context_lines":[{"line_number":248,"context_line":"\t\treturn retval;"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"\tif (bit_file.has_id \u0026\u0026 id !\u003d bit_file.idcode)"},{"line_number":251,"context_line":"\t\tLOG_WARNING(\"id on device and bit-stream don\u0027t match!\");"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"\tretval \u003d certus_load(tap, \u0026bit_file);"},{"line_number":254,"context_line":"\tfree(bit_file.raw_bit.data);"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"ff5bf84b_9b948071","line":251,"in_reply_to":"def12766_7764f2f1","updated":"2022-11-30 15:22:45.000000000","message":"Done","commit_id":"a9536c7fa25227f187aec06815f946f4d67bd884"},{"author":{"_account_id":1001415,"name":"Jonathan McDowell","email":"noodles-openocd@earth.li","username":"u1f35c"},"change_message_id":"8b022bd0ab706433953b4ff72d43ddb0c5cf1827","unresolved":true,"context_lines":[{"line_number":24,"context_line":"#define LSC_DEVICE_CTRL      0x7D"},{"line_number":25,"context_line":"#define READ_USERCODE        0xC0"},{"line_number":26,"context_line":"#define ISC_ENABLE           0xC6"},{"line_number":27,"context_line":"#define BYPASS               0xFF"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"#define PRELOAD_LENGTH 362"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":7,"id":"a11c82c1_2badbaee","line":27,"updated":"2022-12-10 17:31:54.000000000","message":"These look like they match the ECP5 definitions; is there merit in a single set? Do Lattice name their command sets in a way we could have a single set in lattice.h with appropriate prefixes?","commit_id":"c538eb0b74015fc1a820b73a087da8f91bb8a256"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"92f3e7381939f2f6351749cbb9318d2ad1eaea57","unresolved":false,"context_lines":[{"line_number":24,"context_line":"#define LSC_DEVICE_CTRL      0x7D"},{"line_number":25,"context_line":"#define READ_USERCODE        0xC0"},{"line_number":26,"context_line":"#define ISC_ENABLE           0xC6"},{"line_number":27,"context_line":"#define BYPASS               0xFF"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"#define PRELOAD_LENGTH 362"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":7,"id":"26eaf681_6e2d4fc4","line":27,"in_reply_to":"a11c82c1_2badbaee","updated":"2022-12-12 22:50:27.000000000","message":"some commands are named the same or quite the same. With the latest patches they are in separate files for each family.\n\nbtw: bypass is by definition of JTAG the same for all devies 😊","commit_id":"c538eb0b74015fc1a820b73a087da8f91bb8a256"},{"author":{"_account_id":1001415,"name":"Jonathan McDowell","email":"noodles-openocd@earth.li","username":"u1f35c"},"change_message_id":"8b022bd0ab706433953b4ff72d43ddb0c5cf1827","unresolved":true,"context_lines":[{"line_number":26,"context_line":"#define ISC_ENABLE           0xC6"},{"line_number":27,"context_line":"#define BYPASS               0xFF"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"#define PRELOAD_LENGTH 362"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"static int certus_read_status(struct jtag_tap *tap, uint64_t *status, uint64_t out)"},{"line_number":32,"context_line":"{"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"49669288_33946214","line":29,"updated":"2022-12-10 17:31:54.000000000","message":"Is the preload length always the same for every member of the Certus family?","commit_id":"c538eb0b74015fc1a820b73a087da8f91bb8a256"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"92f3e7381939f2f6351749cbb9318d2ad1eaea57","unresolved":false,"context_lines":[{"line_number":26,"context_line":"#define ISC_ENABLE           0xC6"},{"line_number":27,"context_line":"#define BYPASS               0xFF"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"#define PRELOAD_LENGTH 362"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"static int certus_read_status(struct jtag_tap *tap, uint64_t *status, uint64_t out)"},{"line_number":32,"context_line":"{"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"98815b37_aa7fba5c","line":29,"in_reply_to":"49669288_33946214","updated":"2022-12-12 22:50:27.000000000","message":"For the three types I know - yes.\nWith the new patchset this number is a table for each device. I don\u0027t think it makes sense to factor this out for one family.","commit_id":"c538eb0b74015fc1a820b73a087da8f91bb8a256"},{"author":{"_account_id":1001415,"name":"Jonathan McDowell","email":"noodles-openocd@earth.li","username":"u1f35c"},"change_message_id":"8b022bd0ab706433953b4ff72d43ddb0c5cf1827","unresolved":true,"context_lines":[{"line_number":149,"context_line":"\treturn jtag_execute_queue();"},{"line_number":150,"context_line":"}"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"static int certus_program_fuse_map(struct jtag_tap *tap, struct lattice_bit_file *bit_file)"},{"line_number":153,"context_line":"{"},{"line_number":154,"context_line":"\tstruct scan_field field;"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":7,"id":"45c69dc7_c6b9e454","line":152,"updated":"2022-12-10 17:31:54.000000000","message":"This is a general program of a stream of data - the function name suggests perhaps a set of OTP fuses are being programmed. Can we rename to something clearer?","commit_id":"c538eb0b74015fc1a820b73a087da8f91bb8a256"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"92f3e7381939f2f6351749cbb9318d2ad1eaea57","unresolved":false,"context_lines":[{"line_number":149,"context_line":"\treturn jtag_execute_queue();"},{"line_number":150,"context_line":"}"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"static int certus_program_fuse_map(struct jtag_tap *tap, struct lattice_bit_file *bit_file)"},{"line_number":153,"context_line":"{"},{"line_number":154,"context_line":"\tstruct scan_field field;"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":7,"id":"925fe82f_7ed3de61","line":152,"in_reply_to":"45c69dc7_c6b9e454","updated":"2022-12-12 22:50:27.000000000","message":"Done","commit_id":"c538eb0b74015fc1a820b73a087da8f91bb8a256"}],"src/pld/lattice_bit.c":[{"author":{"_account_id":1001415,"name":"Jonathan McDowell","email":"noodles-openocd@earth.li","username":"u1f35c"},"change_message_id":"8b022bd0ab706433953b4ff72d43ddb0c5cf1827","unresolved":true,"context_lines":[{"line_number":57,"context_line":"\t\t\t\tif (bit_file-\u003eraw_bit.data[pos - 1] \u003d\u003d 0xbf \u0026\u0026"},{"line_number":58,"context_line":"\t\t\t\t\tbit_file-\u003eraw_bit.data[pos - 2] \u003d\u003d 0xff \u0026\u0026"},{"line_number":59,"context_line":"\t\t\t\t\tbit_file-\u003eraw_bit.data[pos - 3] \u003d\u003d 0xff) {"},{"line_number":60,"context_line":"\t\t\t\t\tstate \u003d DONE;"},{"line_number":61,"context_line":"\t\t\t\t}"},{"line_number":62,"context_line":"\t\t\t\tif (bit_file-\u003eraw_bit.data[pos - 1] \u003d\u003d 0xbe \u0026\u0026"},{"line_number":63,"context_line":"\t\t\t\t\tbit_file-\u003eraw_bit.data[pos - 2] \u003d\u003d 0xff \u0026\u0026"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"4a765b32_3c8d0ac6","line":60,"updated":"2022-12-10 17:31:54.000000000","message":"If the file is encrypted should we not note that fact and return an error?","commit_id":"c538eb0b74015fc1a820b73a087da8f91bb8a256"},{"author":{"_account_id":1001810,"name":"Daniel Anselmi","email":"danselmi@gmx.ch","username":"danselmi"},"change_message_id":"92f3e7381939f2f6351749cbb9318d2ad1eaea57","unresolved":true,"context_lines":[{"line_number":57,"context_line":"\t\t\t\tif (bit_file-\u003eraw_bit.data[pos - 1] \u003d\u003d 0xbf \u0026\u0026"},{"line_number":58,"context_line":"\t\t\t\t\tbit_file-\u003eraw_bit.data[pos - 2] \u003d\u003d 0xff \u0026\u0026"},{"line_number":59,"context_line":"\t\t\t\t\tbit_file-\u003eraw_bit.data[pos - 3] \u003d\u003d 0xff) {"},{"line_number":60,"context_line":"\t\t\t\t\tstate \u003d DONE;"},{"line_number":61,"context_line":"\t\t\t\t}"},{"line_number":62,"context_line":"\t\t\t\tif (bit_file-\u003eraw_bit.data[pos - 1] \u003d\u003d 0xbe \u0026\u0026"},{"line_number":63,"context_line":"\t\t\t\t\tbit_file-\u003eraw_bit.data[pos - 2] \u003d\u003d 0xff \u0026\u0026"}],"source_content_type":"text/x-csrc","patch_set":7,"id":"15042549_ea591e2c","line":60,"in_reply_to":"4a765b32_3c8d0ac6","updated":"2022-12-12 22:50:27.000000000","message":"Maybe you\u0027re right. But it should be possible to program an encrypted file if the programmed key matches. Give me some time to think about it please","commit_id":"c538eb0b74015fc1a820b73a087da8f91bb8a256"}]}
