)]}'
{
  "commit": "6a4b49e5088ebec2016c81cb547ac745aa3799ef",
  "tree": "6633683d38b549a75146edafd5dcb91625968d14",
  "parents": [
    "f85033e8e42fcae9ede8bc9d57c626332f8c3604"
  ],
  "author": {
    "name": "Eunchan Kim",
    "email": "eunchan@opentitan.org",
    "time": "Tue Feb 18 10:33:39 2020 -0800"
  },
  "committer": {
    "name": "Eunchan Kim",
    "email": "eunchan@opentitan.org",
    "time": "Thu Feb 20 14:41:45 2020 -0800"
  },
  "message": "[topgen] Use OrderedDict for top, xbar objects\n\nThis is related to PR #1552.\n\nProblem:\n\n    In Azure Pipeline that uses Python 3.5, doesn\u0027t keep the order of\n    hjson keys. It results the generated hjson has a lot of change\n    randomly.\n\n`dict` type in python is unordered dictionary. It doesn\u0027t maintain the\norder of keys in the dictionary. `topgen` dumps a couple of hjson files,\nsuch as generated tops (e.g.\n`hw/top_earlgrey_data/autogen/top_earlgrey.gen.hjson`) and the crossbar\nconfigurations (e.g.\n`$TOP/ip/xbar_{name}/data/autogen/xbar_{name}.hjson`). This unordered\nbehavior creates random changes to the generated files, which increases\ncommit diffs.\n\nFrom python3.7, the default dictionary type is changed to\n`collections.OrderedDict`. So, if the `topgen` runs on the system \u003e\u003d\npython3.7, it always maintain the order.\n\nResolution:\n\n    Use OrderedDict when create dictionary variables.\n\nWith OrderedDict (introduced in Python2.7), the generated hjson files\nare remains in order.\n\nSigned-off-by: Eunchan Kim \u003ceunchan@opentitan.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0efe46acc6ad3daac7534e975b408d87dbb35c3f",
      "old_mode": 33261,
      "old_path": "util/topgen.py",
      "new_id": "dab1da0aa5b34950e4eb68b30c4bcae9d8bc8423",
      "new_mode": 33261,
      "new_path": "util/topgen.py"
    },
    {
      "type": "modify",
      "old_id": "ad73c21f5003c83068a0a35fc14d7a0d291cfe39",
      "old_mode": 33188,
      "old_path": "util/topgen/intermodule.py",
      "new_id": "334b9dbc922d32543a8f6b043bb46e9507083387",
      "new_mode": 33188,
      "new_path": "util/topgen/intermodule.py"
    },
    {
      "type": "modify",
      "old_id": "e5ed1630898d4eb84b57bb63cc4e5d0859f0f957",
      "old_mode": 33188,
      "old_path": "util/topgen/lib.py",
      "new_id": "598482e7216ab65b094bb28b5153956d801bc9de",
      "new_mode": 33188,
      "new_path": "util/topgen/lib.py"
    },
    {
      "type": "modify",
      "old_id": "62e96ecbbca562d912eaa25e6482463de2775291",
      "old_mode": 33188,
      "old_path": "util/topgen/merge.py",
      "new_id": "0c3d01e6754071e623db63a1593b24b297c603b4",
      "new_mode": 33188,
      "new_path": "util/topgen/merge.py"
    },
    {
      "type": "modify",
      "old_id": "2e1f4471a7d2d0b0007e4d04bde919f994627450",
      "old_mode": 33188,
      "old_path": "util/topgen/validate.py",
      "new_id": "b9947a058fc06e8552219b44c425795830b2eba1",
      "new_mode": 33188,
      "new_path": "util/topgen/validate.py"
    }
  ]
}
